Tech Reflect
  • Home
  • About This Site
  • Contact me
  • Search Icon
fish, an alternative to bash

fish, an alternative to bash

2017-05-15

Table of Contents

Toggle
  • Advantages
    • History
    • Case insensitivity
    • Subset completion
    • Disadvantages

The shells you hear about the most, like bash, tcsh, and zsh aren’t the only shells out there. For about 5 years, I’ve used a shell called fish. While the community of people using it is quite small, it’s a passionate group and the shell has some features you’ll wonder how you lived without.

You can download it here.

Fish shell

The cheeky headline on the pages pokes fun at other shells. The documentation is excellent and worth perusing.

I like to describe it as the Apple of shells. Even though it’s possible to get many fish features in other shells, it typically involves many trips to Stack Overflow or borrowing people’s shell files. The fish shell tends to make these the default or make it easier to set them up.

Advantages

  • Many of the common things people want are enabled by default, like case-insensitive completion on the command-line
  • Tab-completion is simply amazing
  • Shell parameters can configured in a web interface
  • Support for functions with easy syntax

I’d like to call out tab completion as this is my favorite feature and is typical of fish. Here’s are a couple of examples.

History

Just like other shells, before you type anything, hit the up and down arrow keys and note you get your command history like in other shells.

Now type rm and note it completes to you last use of the rm command. Now, when you arrow up and down, you only see a history of rm commands you typed. Awesome.

Take it further and type rm -rf and arrow up and down to narrow it further.

Take it further and type rm -rf ~/Library and arrow up and down and see only uses of rm -rf in your infinite history.

Case insensitivity

Other shells can be configured to do case insensitive completion, but fish does it out of the box. Saves you that extra time reading Stack Overflow.

Subset completion

In fish, you can also type part of a filename that is not necessarily the beginning and it will complete based on that. One great example of this being useful is you go into an Xcode project directory. You can do open xcode<tab> and it will complete to one or mode xcodeproj files.

Case insensitivity combined with subset completion means more completion and less beeping on the command line when you hit Tab.

Disadvantages

  • Using other machines that don’t have the shell involved can be a pain
  • bash commands typed on the command-line may not work – you’ll have to type “bash” to switch first
  • The web configuration UI is cool, but a bit flaky

geeky, macOS tips

Post navigation

NEXT
The three different clipboards
PREVIOUS
Many-to-many screen sharing
Comments are closed.

Get Monthly Updates

Recent Posts

  • Inserting random email sigs in Mail on iOS
  • Keep Instagram open to finish posting…
  • How I predicted the rise of Twitter, barely used it, and amassed 35,000 followers
  • Apple Books 2022, in pictures
  • Killing one bird with two-and-a-half stones in Mac OS X Mail

Categories

  • analog (1)
  • apple career (12)
  • apple inside (19)
  • apple stories (20)
  • bertrand serlet (3)
  • bugs (3)
  • essays (15)
  • geeky (21)
  • interviews (4)
  • iOS tips (4)
  • Mac OS X (7)
  • macOS tips (36)
  • personal (8)
  • predictions (1)
  • products (5)
  • prototypes (6)
  • scott forstall (7)
  • scripting (2)
  • siri (2)
  • steve jobs (16)
  • tim cook (1)
  • workplace (15)

Get Monthly Updates

About cricket


Me with Guiness the owl

25 years in tech. I like to write manifestos. I like to offer interesting tips. I like making fun of things. Everyone copes differently.

My Other Blogs

  • Free Range Parrots
  • Plucky Tree (personal)
© 2025   All Rights Reserved.