Developers are religious about two things: their editor and their shell.
After getting multiple recommendations from friends and co-workers I gave fish a try. It lists several benefits over other shells, among other there’s autosuggetions, colour support and web based configuration.
Installing it on a Mac is easy with Homebrew, so I figured why not give it a fair try.
And yes, fish has its benefits. I used the web based configurator. Once. The only feature that really stood out to me was the autosuggestions and more notably the fact that fish will suggest commonly used commands based on the directory you’re currently in.
Still, the most annoying thing is that fish is not POSIX compatible. Although I’m not a purist that insists on POSIX compatibility, it imposed some practical limitations.
The first and most annoying thing is environment variables. I’m not talking about the globally set variables, but those you use to run a command once.
Normally I’d do something like this:
TIME_COP=2016-02-24 rake app:send_daily_notifications
Well, that doesn’t work in fish as it needs you to explicitly run the
env TIME_COP=2016-02-24 rake app:send_daily_notifications
It’s a subtle difference, but if you’re used to the old syntax and have quite some documentation with snippets like this, it’s quite a nuisance.
&& vs &
Running a second command conditionally is a construct I use often:
./analyse_data.rb && rake app:send_daily_notifications
./analyse_data.rb fails (e..g it has a non-zero return value), then
the supplied rake task will not be executed. Again, this is something I
Fish on the other hand uses a single
&& operation is invalid.
Incompatibility with Vim
You’ll need to give Vim some extra love and attention when you’re running fish. Namely, you’ll need to explicitly tell Vim to not use fish, but bash instead.
It’s a simple fix, but one that should not be necessary.
Back to Zsh
The issues I have with fish are minimal and due to my own personal preference. I think fish is a nice shell, but it just doesn’t fit me.
So, back to Zsh! But no more Oh-My-Zsh-crap, please! More on how I’ve setup Vim/Tmux/Zsh in a later post.
If you're seeing this message you've probably enabled some form of adblocker. I respect that.
I use this space to show recommended books on Amazon.com in relation to the post you just read. This generates a small income that allows me to buy a book every now and then.