zsh is really awesome

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:

  1. 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!
  2. Better file globbing. ls **/, simulates find. Replacing ls by another command is equivalent to find -exec. Less typing!
  3. 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.
  4. Auto-completion built in. bash-completion offers many of the auto completion features, but zsh has far more commands in the list.
  5. 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. :)

Posted in scripting, tech
2 comments on “zsh is really awesome
  1. Sankalp says:

    True, dat. I don’t feel like going back to bash any more 😀

  2. Sankalp says:

    http://mikebuss.com/2014/02/02/a-beautiful-productive-terminal-experience/

    this mentions a faster zsh framework, kinda similar to oh-my-zsh, but works dramatically faster… it’s called Prezto. Check it out!

Leave a Reply