Fish Shell is Awesome

February 10, 2022

(when I switched my shell to zsh, I mentioned that I would try fish and report back: this is it.)

TLDR:

Truth in Advertising

The front page of the fish shell has a “sales pitch”

the fish shell advantages, as shown on the home page

I rediscovered it while coming up with my own list of what makes fish great. But the pitch already has most of my points – fish shell had tried to tell me all along, I just hadn’t believed it!

Try Before You Buy

I think the biggest fears when switching shells come down to:

For the first point, once installed (brew install fish, or equivalent), just type fish. You will be running fish without fiddling with your terminal or default shell. If you don’t like it, type exit to return to your “real” shell. This is low commitment!

For the second point, I have some good news:

If you want to customize the colors or the prompt, type fish_config and enjoy the browser-based config and preview.

preview of the fish_config web based user interface

All About Completion

The feature that makes or breaks a shell is what happens when you press TAB. I would NOT be talking about fish if its completion wasn’t excellent.

Let me try to summarize with a few examples:

fish knows in advance when commands won't work

fish remembers what you typed and hints from history

Yes, other shells have history completion – the difference is that it shows up automatically. With bash/zsh, you have to remember that a command is in your history to want to grab it with ctrl-r.

More about command history:

Other features worth mentioning:

press TAB to show command-line flag completion and help

A few other things:

What’s the Catch?

The biggest catch is that it’s not default. You have to install it (probably) and enable it. Default choices are powerful, and that’s why bash/zsh still rule.

You can reduce the pain by “cheating”. Add fish to the bottom of your .bashrc/.zshrc

# pretty easy, no?
fish

Comment it out if you change your mind.

A few other things to know:

So, yes, fish will spoil you. And if you have to use other shells, you will miss its features.

Is that such a bad thing?

Final Worlds

Technology becomes truly useful when it becomes invisible.

I spent years trying to beat bash (and zsh) into shape. Many of my blog posts were about removing friction from the command-line experience. There is some joy in mastering complicated tools…

But fish allowed me to do everything I wanted, and more, without feeling like a struggle. (or worse: spending days/weeks/months getting my configuration just right)

Give fish a try and let me know what’s missing.

Discuss on Twitter