- cross-posted to:
- programming
- cross-posted to:
- programming
You can add options if what you use isn’t there. :)
I use Bash and I’m open to people explaining why a different shell would make a difference for me, unless it’s a matter of preference? For instance I’m not a huge Arch zealot, but by now I know all the pacman commands and I don’t see the point of switching.
I would recommend installing fish and just launching it in your terminal (just run ‘fish’), to play around with it.
Fish has a lot of convenience features set up / enabled by default, so you can get a good impression of what’s possible without too much trouble setting it up.
You may prefer going with zsh + oh-my-zsh for the long-term, as fish’s syntax is only similar to bash, not entirely compatible with it (they actually try to improve on it), and zsh is striving for bash compatibility, it’s just more work to get it set up with all of the features.
BASH because I’m still not very good at it and I’m scared of using other non-defaults lol
omg same xD
deleted by creator
I use bash because it’s the default and the alternatives are not that much better that it’s worth switching.
happy fish user :)
deleted by creator
Why do you like zsh better than bash?
deleted by creator
when writing scripts, I mostly use Bash or posix sh, but I recently switched from Zsh to Fish for other uses. Also interested in how Nu is developing
deleted by creator
you need bash for many system functions… if you uninstall it you better be a good systems engineer and know linux well not just as a user :)
Let me tell you about xonsh.
It’s a modern full python programmable shell and it’s awesome! I’ve been using it for 2 years now and while it has some support issues having a full-blown python in your shell is just so convenient!
There are lot of brilliant UNIX tools likegrep
,jq
etc. however often I find myself in a place where I feel I could write 2 lines of python faster and easier than researching and messing around with processing tool such asjq
— if you get this feeling thanxonsh
is the shell for you!Example of common use case, renaming files:
$ ls bar.md foo.md dir/gar.md $ for file in Path().glob('*'): $[mv @(file) @(file.name + '.bak')] $ ls bar.md.bak foo.md.bak dir/gar.md.bak
Here we glob through files recursively and suffix
.bak
to every one of them.Xonsh gives you a lot of flexibility in your shell and you should give it a go. There’s a web-based playground on https://xon.sh homepage that you can spin up to try xonsh hassle-free!
Xonsh is great but it still doesn’t feel ready for production usage. I think you still can’t delete stuff from history which is a deal breaker for me.
deleted by creator
deleted by creator
deleted by creator
np! highly recommended, it’s fast too.
And it should get even faster: The devs are planning to address the major bottlenecks for 1.0 and do a ground up rewrite for 2.0. async prompt support is considered.
oh nice, that sounds awesome
bash, I use for loop, stdin/out redirection and conditional operator somewhat often and I put them in script if I use a snippet a lot
deleted by creator
Fish is appealing to me, though I haven’t invested any time in linking a somewhat extensive set of bash functions, aliases, etc. But sometimes it is nice to drop down into it when working with many files of uncertain names and so on. Do you do much with fish_variables, etc? The documentation seems quite oblique.
deleted by creator
Whether people use fish as a main shell or a tool perform certain types of activities is not entirely clear to me. But in my bashrc I have several search functions, timestamps aliases which I find myself inadvertently calling from fish. I could port them over to fish_variables and such, but I don’t really want to maintain two sets of shell customisations. Another example is if you accidentally try to activate a vitualenv … I suspect it is not really meant to be a main shell, but thats why I asked.
you can get the best of both worlds with zsh and zsh-autosuggestions
deleted by creator
I also use bash - I tried zsh, but there was a startup delay I couldn’t stand.
Plus, bash has a lot of features that you just need to turn on (mostly using shopt) - things like autocd, cdspell/dirspell, cmdhist, direxpand, extglob, globstar, histappend, should probably just be on by default these days, as well as a HISTTIMEFORMAT that includes date and time.
I use fish mainly because it has contextual autocomplete based on the folder.