4 ms·
I really like this conceptually. I feel like with Powershell, you need a bunch of commands that actually pass objects around or act upon them; and something sim
by djsumdog 7y ago
I really like this conceptually. I feel like with Powershell, you need a bunch of commands that actually pass objects around or act upon them; and something similar in Linux would require writing a lot of extensions first.
I've been using fish shell for years and glad I started down that route. It's been incredibly useful.
I really want to give this a shot too. I feel like too often I'll open up Python, read a file and then manipulate it when I need to something more complex than simple grep/sed/cut/wc etc... This feels like it really fills in that gap. It starts with something really simple: get your unstructured output in a structure, and then build from it. I could see people writing more custom extensions and objects later on if this gets popular.
- electricEmu 7y agoPowerShell works on Linux today. It's consistent and works fine for this Go-developer's needs. It's spectacular to have a shell with consistent verbiage and parameters. https://aka.ms/getps6-linux https://aka.ms/getps6-linux
- lukeschlather 7y agoThe big problem with Powershell, and it makes it borderline unusable on Linux, is its crazy error handling. The equivalent of bash's `set -e` is `$ErrorActionPreference="Stop"`. The problem is that it treats any output to stderr as an error and ignores actual posix errors (non-zero exit codes.) What's worse is in some contexts the error it throws on stderr is impossible to catch. I really love Powershell in a lot of ways but this makes a lot of really basic scripts in bash very cumbersome to write in Powershell.
- geekone 7y agoDo you have any examples of stderr errors being impossible to catch in PS, and/or a basic script that is very easy in Bash but cumbersome in PowerShell?
- lukeschlather 7y agoRecently I was trying to automate something with gsutil (Google's storage CLI) using Powershell remoting to a Windows host. gsutil is a totally well-behaved posix app, which emits status information to stderr. The bug is specifically that when using remoting (Windows equivalent of ssh) the error is uncatchable. [Remoting Bug] https://github.com/PowerShell/PowerShell/issues/3996 https://github.com/PowerShell/PowerShell/issues/3996 [RFC for improved error handling] https://github.com/PowerShell/PowerShell-RFC/pull/88 https://github.com/PowerShell/PowerShell-RFC/pull/88 Ultimately I just want Powershell to handle well-behaved posix apps in a sane way, but honestly the reaction of some of the people on the thread seems like there's a huge cultural gap between Microsoft and the Posix community. (Which, Microsoft claims to be a part of but clearly is not.)
- j88439h84 7y agoPython has a similar idea with Mario. But because it's not a shell itself, it requires less of a commitment. https://github.com/python-mario/mario https://github.com/python-mario/mario
- sciurus 7y agoOr even more similar to the project being discussed, https://xon.sh/ https://xon.sh/
- agalunar 7y agoIf you like xonsh, I might recommend the tako shell (by a former xonsh dev). https://takoshell.org/ https://takoshell.org/
- Skunkleton 7y agoTako seems to handle background tasks better than xonsh. The link to the code isn't working though, so I am not sure why.
- agalunar 7y agoCan you tell me which link is broken? The author's a friend, and I can poke him to update it.
- Skunkleton 7y agohttps://hz.mit.edu/git/tako/tako https://hz.mit.edu/git/tako/tako
- kzrdude 7y agoThanks for making me aware of this. It seems less fluent to use mario