Why I Like Fish

Posted:

I am of course talking about the Friendly Interactive SHell!

For about three or four years now, I've been a pretty happy zsh user. I had a pretty decent, not-too-complex/customized setup based on a popular framework that bills itself as "minimal", but a recent whim prompted me to check out fish.

The familiarity offered by zsh wasn't enough, though, when compared to the tradeoff of far less config for as much as or arguable more functionality. Intrigued? Want to hear more?

Why fish?

At the top of fishshell.com, fish bills itself as "a command line shell for the 90s", and it's design document says "Configurability is the root of all evil". Bold words, especially for someone like me who deeply values configurability and control. It turns out, these points work in favor of fish and the resulting experience has been awesome for me!

With fish, I get almost all of the functionality I had with zsh and zprezto out of the box! Things like command and tab-completion not only work equally well but are actually more elegant in my opinion. And that's with zero configuration.

But I want to change that

Okay so configuration is evil... I don't necessarily agree with that as a blanket statement but it works well for fish. But what if you don't love the default prompt? Well don't worry, I didn't either and the path to customization is better than you might expect.

Okay so configuration is evil... I don't necessarily agree with that as a blanket statement but it works well for fish. But what if you don't love the default prompt? Well don't worry, I didn't either and the path to customization is better than you might expect.

fish_config

To begin down the path of fish customization, run the fish_config command. This will open a web browser to a local "fish shell configuration" page, which allows you to tweak colors or your prompt, view functions, variables, history, or bindings.

This is a really great place to start on your own prompt or whatever; Just select a default that has something you like and tweak away. But if that isn't enough, you can always reference the excellent themes and functions in oh-my-fish for your own.

Aliases? Functions!

In fish, command aliases as you know them from bash aren't really idiomatic; You can use alias, which is just a wrapper for function, and it will behave like you expect it to, but the official documentation recommends making a function.

Oh-my-fish

I personally didn't go with oh-my-fish (just using bits of themes and etc.) because I didn't feel like I needed to; As mentioned earlier, you really get so much out of the box with fish that it just doesn't feel necessary. Perhaps some day I'll take it for a test spin but for now I'm totally cool with the handful of functions (aliases) I wrote myself.

Conclusion?

This concludes my little rant about fish. I hope I've shown why it's so darned nifty - give it a shot sometime. Their FAQ (and the rest of their documentation, in general) is very good so make sure to give it a read.

This page was last modified on: 2020-07-26