Busybox ash is pretty good, the point was that it's like a folding bicycle - definitely kinda worse than a proper bicycle (bash), still definitely by far better than an old velocipede (/bin/sh), and also extremely lightweight and portable, being part of Busybox.
fish is represented by a scooter because it's more streamlined, easier to use and more modern than the rest, and far more powerful than the bicycles much like zsh.
xonsh is a cross-platform shell and a Python 3.4+ superset. Basically, a shell inside of Python. You can combine all the capabilities of Python with shell scripting - parse command output with Python, generate command arguments with Python, access your $PATH as a Python list and lots more. It can also source bash, zsh and cmd.exe scripts. And interactively, it's still on point, it has syntax highlighting, dropdown completions, great line editing, PS1 as a Python lambda, and rich history files. It's represented by an Aventador because of how it's a completely different animal and how ridiculously powerful it is. Here's a 30-minute talk on Xonsh and its official website.
chsh -s $(which powershell) ; would work.
You may also be interested in http://xon.sh/, though you seem invested in the Microsoft languages.
Microsoft languages are avoided because of the vendor lock-in / embrace-and-extend or just because much like there were "microsoft shops" back in the day there are so many places that run purely Open Source stacks in the cloud based on Python, GoLang, Javascript (Node), Scala, and more, with zero microsoft anything.
I hear you on TypeScript, TypeScript is great stuff.
I've made one for <code>xonsh</code> shell: https://github.com/Granitosaurus/xonsh-click-tabcomplete
It works by checking for pip packages that require click
and parsing the help string using regex for commands and flags. It's pretty simple but it works as long as you don't change up click default message generation too much.
You can't just mix bash and python willy nilly. If you think about it in detail, there are lots of ambiguities that pop up when you mix two programming languages together. For example, is history
a bash command or a python variable? Is |
the pipeline operator or the bitwise or?
The closest I can think of to what you want is that there are some alternative shells that change the shell language to make it more amenable to programming. You might want to check out xonsh, which is very Python inspired or fish, which is closer to a traditional shell.
There's a serious problem with pipelines. Actually I believe they aren't pipelines at all. They are supposed to use pipe() to tie the standard out of one sub-process to the standard in of the next. However, it seems that xonsh does something like waiting for the first sub-process to complete or close its standard out, then gives the entire result to the second sub-process as a string. This is kind of borne out by the fact that functions used as aliases are specified as taking a string rather than a file-like object.
To test this, run cat
and provide it the input 1<enter>2<enter>3<enter><ctrl-d>
, then run cat | cat
and give it the same input. In Bash these two commands (correctly) behave exactly the same: they echo each line as soon as it is entered, and then exit at the EOF generated by <ctrl-d>
. In xonsh, the single cat
command behaves this way, but the piped one (cat | cat
) never produces any output at all, and must be killed with <ctrl-c>
or from another shell.
EDIT: Spoke to the devs. Two updates:
pipe()
isn't used, but that terminal input gets tied to the last process in the pipe rather than the first. Being worked on, but apparently not a trivial fix.How to make it run at launch in my terminal? I've tried:
if [ -z "$XONSH_STARTED" ]; then
export XONSH_STARTED=true;
xonsh;
fi
in .bashrc, to no avail. Any suggestions?
Edit Nevermind, anser is here: http://xon.sh/linux.html#additional-setup
Indeed. I use vim without any plugins. I also have very few custom keybindings. I just set a few of the basic settings like tab-replacement and search wrapping and I'm good to go. My shell and other command-line tools (grep, etc.) complete my IDE. I'm also experimenting with using xonsh for that shell, which would give me the Python integration I don't really need in vim. There are a few kinks though (I've been running into problems with pipelines).
Alright! We've just released xonsh v0.3.4 (available from conda or pip, or from Github master), which I believe should fix this issue.
The relevant changes are: we no longer inherit the $PROMPT
variable from the parent environment, and we now fail in a more graceful way if the $PROMPT
is malformed. A full changelog is available here.
If you get a chance to try it out, please let me know whether this fixed those problems, and also generally feel free to let us know if you have any other feedback!
Alright! We've just released xonsh v0.3.4 (available from conda or pip, or from Github master), which I believe should fix this issue.
The relevant changes are: we no longer inherit the $PROMPT
variable from the parent environment, and we now fail in a more graceful way if the $PROMPT
is malformed. A full changelog is available here.
If you get a chance to try it out, please let me know whether this fixed those problems, and also generally feel free to let us know if you have any other feedback!
Alright! We've just released xonsh v0.3.4 (available from conda or pip, or from Github master), which I believe should fix this issue.
The relevant changes are: we no longer inherit the $PROMPT
variable from the parent environment, and we now fail in a more graceful way if the $PROMPT
is malformed. A full changelog is available here.
If you get a chance to try it out, please let me know whether this fixed those problems, and also generally feel free to let us know if you have any other feedback!
Alright! We've just released xonsh v0.3.4 (available from conda or pip, or from Github master), which I believe should fix this issue.
The relevant changes are: we no longer inherit the $PROMPT
variable from the parent environment, and we now fail in a more graceful way if the $PROMPT
is malformed. A full changelog is available here.
If you get a chance to try it out, please let me know whether this fixed those problems, and also generally feel free to let us know if you have any other feedback!
Alright! We've just released xonsh v0.3.4 (available from conda or pip, or from Github master), which I believe should fix this issue.
The relevant changes are: we no longer inherit the $PROMPT
variable from the parent environment, and we now fail in a more graceful way if the $PROMPT
is malformed. A full changelog is available here.
If you get a chance to try it out, please let me know whether this fixed those problems, and also generally feel free to let us know if you have any other feedback!
Alright! We've just released xonsh v0.3.4 (available from conda or pip, or from Github master), which I believe should fix this issue.
The relevant changes are: we no longer inherit the $PROMPT
variable from the parent environment, and we now fail in a more graceful way if the $PROMPT
is malformed. A full changelog is available here.
If you get a chance to try it out, please let me know whether this fixed those problems, and also generally feel free to let us know if you have any other feedback!
I believe if you just install prompt_toolkit
it'll use it by default. But if you've saved a configuration that sets it to use readline
you might have to set the SHELL_TYPE environment variable.