What if you invested in learning POSIX sh?
Wouldn't your scripts and one liners written in POSIX sh work in zsh, bash, etc.?
You could be comfortable on any server, no matter what the shell.
Even servers that default to tcsh still have /bin/sh.
But if you're going to dive deep on any of them, bash has a pretty unique and strong argument for being quite likely to be available on most of the machines you work with on a day to day basis.
The servers I use do not have bash installed by default.
The only time I use it is when I am forced to by an installation script.
I install bash on an as needed basis, and when I'm done using it, I uninstall it. I just have no need for it otherwise.
What is the shell on Android? Is it bash?
Many servers don't have bash installed as part of their base distribution, but if they're going to have another shell already installed it's much more likely to be bash than zsh.
And thanks to oh-my-zsh (https://github.com/robbyrussell/oh-my-zsh) it really requires very little fiddling, maybe 10 minutes worth.
Here is a great gallery of oh-my-zsh themes: http://zshthem.es/all/
What's really neat is you can even use it on Windows.
My personal setup is Cygwin Zsh inside Console2 (tabbed cmd.exe shell) proxied via ansicon.exe (makes cmd.exe ansi color escape aware). It's not quite as nice as say Konsole on linux or iTerm2 on a mac, but it's the best I've found for windows.
Setup guide:
Setup console2 like this http://www.hanselman.com/blog/Console2ABetterWindowsCommandP...
This post sets up ansicon: http://www.kevwebdev.com/blog/in-search-of-a-better-windows-...
https://code.google.com/p/conemu-maximus5/
I haven't tried Console2, so I can't provide a comparison, but here's Scott Hanselman deciding to switch: http://www.hanselman.com/blog/ConEmuTheWindowsTerminalConsol...
What are some of the differences that made such a difference for you?
- tab completion on a shit-ton of stuff (configure scripts, makefiles, ssh hosts, aptitude packages, git branches)
- partially entered command? push up to look at similar commands you have previously entered
- immediate propagation of zsh_history to all open shells
you could (correctly) argue that you can do all that in bash. of course, shell scripting is turing complete, so yes, you can. but with zsh, it's already there, and ready.
I use bash's reverse incremental search ("C-r") to do that. Is the zsh that much better than that?
The history sounds neat, except that I tend to segregate my terminal tabs to specific tasks/projects so I'm not very likely to want a command from one tab in another. Also I always set my bash history file to /dev/null so I don't have to worry about leaving sensitive data lying around, which means I new tabs are always a clean slate.
i don't doubt that at all - but it's hardly default bash, and i frequently don't have root on the systems i use (whereas zsh is usually there)
> I use bash's reverse incremental search ("C-r") to do that. Is the zsh that much better than that?
hands down yes. nobody had to explain how "up-complete" (i don't know what's it's called, but i'm calling it that because that's what it does) works to me. simple and intuitive!
> Also I always set my bash history file to /dev/null
fair enough - different people have different uses for things, i thoroughly recommend you try zsh though, because, why not! have a poke around the excellent oh-my-zsh as well, try out some themes.
i thought i had a good work flow with bash, and that there was really any room for improvement. after a few hours of zsh on my laptop, it was my shell everywhere :)
For Bash, M-# (alt-shift-3) puts a comment token '#' at the start of the current line and begins a new empty line. Handy if you are 150 characters deep in a command and realise you need to do something else for a moment (i.e. momentarily in the correct sense). You can store your 150 char command and come back to it, it is in the history and can be retrieved with a couple of Up-arrows.
mark . marks the current directory in a folder full of symlinks.
jump <tab> expands to a list of your favorite folders.
super simple and extremely low overhead.
[1] http://jeroenjanssens.com/2013/08/16/quickly-navigate-your-f...
cd s*/l*/f*/p*