Fishy zishy

Armin Briegel, author of Scripting OS X, has been writing a series of articles on his transition from Bash to the Z Shell (zsh). So far there are seven parts, touching on a number of things encountered in zsh:

I’ve really been enjoying reading these articles. There’s at least one more big article to come, covering scripting with zsh.

I was always a bash user because that’s what OS X shipped with. I had put some time in over the years customising aliases and functions, but never anything too deep. After all, I didn’t spend that much time in the Terminal.

About a year ago I started spending more time at the command line and changed my shell to the ‘modern’ shell called fish. It comes with lots of nice in-built features like colourisation! Not just in syntax highlighting on the command line, but you don’t even need to specify a --color or -G flag to get colourised ls output, for example. Holding down Option and pressing the left or right arrow key also does what I expect (as a Mac user), and jumps word-by-word.

Reading this had me wondering whether I should move to zsh myself. Last weekend I spent some time setting it up, moving over aliases and customising my prompt. I’ve been using it since and in that limited time I’ve not found a lot compelling – but I’m also not using any plugins like oh-my-zsh. I agree with Mx Briegel on the matter. I’d rather configure it how I like without assistance, at least at first.


Both shells offer nicer scripting syntax. Here I agree with Dr Drang who wrote:

I think people who script in the shell—any shell—are masochists.

Most scripts I’ve got are simple enough that writing them in Perl instead might qualify as more masochistic. However, the script I wrote a couple weeks ago started simple and grew to the point where I was regretting it. I bumped up against bugs and incorrect or poor documentation of the fish specification.

As a result the script is less robust and featured than I’d like, even if it’s only something I’ll use. My mistake. Naturally the bugs and documentation should be corrected, but I should have been using a better tool for the job.

For now I suspect I’ll stick with fish. I can imagine a situation where I might use both: zsh on Linux but fish on my Mac. I will, however, continue to use zsh for a while as I explore features and maybe try some plugins.