Why I Finally Stuck With zsh

| Comments

I have been a bash user for about 15 years now. I have probably installed zsh at least a half dozen times over the years with the intention of giving it a proper try. Nine months ago I finally put in the effort to properly switch over to zsh and I am glad I finally did it.

Using zsh isn’t much different from using bash. Almost everything that works on the command line in bash works in zsh, except that most things work just a bit better. Almost all the aliases and functions that I’ve accumulated in my .bashrc over the years ported over with little to no changes. All my little helper scripts in my ~/bin directory still work—they still run under bash or sh.

I decided to use oh-my-zsh as a starting point. I think this was a good idea. It sets up a lot of sane defaults, and its configuration is nice and modular. My laptop is the only machine I am currently running zsh on, so I am constantly being me aware of the features missing in my old bash setup.

complete_in_word

This is the feature I am most likely to miss when I am using bash. You can type things like /u/l/b<tab> and zsh will complete it to /usr/local/bin/. I use this constantly and it works really well when completing remote filenames in an scp.

scp Completion Works Better

I always seem to run into weird quoting issues when I use bash’s tab completion with scp. Sometimes it works great, other times it gets confused. I don’t remember having any weird completion behavior with zsh so far.

Recursive Globbing

Recursive globbing means that I don’t have to reach for find quite as often. You can run handy commands like wc -l **/*.p[lm] instead of more convoluted commands like find . -name '*.p[lm]' -print0 | xargs -0 wc -l {} \;.

Comments