A few months ago, I decided to try out zsh as my default shell. It’s very similar to bash, but is much more powerful. My favourite features so far:
- Shared command line history among all sessions. I usually have at least 4-5 shells open, and the command history being shared among them is awesome. Means I don’t have to hunt in which shell I typed that huge pipe command, it’s just available across all the shells!
- Better file globbing. ls **/, simulates find. Replacing ls by another command is equivalent to find -exec. Less typing!
- Programmable prompt. My zsh shows the git/svn branch name in the prompt itself. People have gone so far to have written a prompt which displays the battery status right there. One word, zsh is extensible, very extensible. zsh also has two prompts, one which appears on the left side (the normal one), and another on the right side.
- Auto-completion built in. bash-completion offers many of the auto completion features, but zsh has far more commands in the list.
- Command arguments expansion. Pressing tab on a command with wildcards/backtick commands expands them. So something like ls *avi, will actually fill in in all the .avi files in the prompt, so I know what’s going on.
You don’t even have to bother with your zshrc
My zsh experience improved ten-fold after I installed robbyrussel’s oh-my-zsh. Setting it up is just two commands (and another for changing your default shell):
oh-my-zsh will provide plugins (git, yum, deb, svn etc) , themes (I currently use afowler), a lot of sane configuration options, and better keyboard shortcuts.
You won’t go back to bash once you use zsh. 🙂