How to Boost Your Productivity With Fish Shell (Command Line Auto-completion)

Learn how to save a lot of time typing in your command line by using Fish Shell instead of the default Mac Terminal.

Fish Shell is a terminal/command line shell that is great at two things:

  • Auto-completing your terminal commands
  • Remembering your previous commands so you won't have to type them again

You have to try it to see the massive boost in productivity Fish Shell gives you right out of the box.

See Fish Shell in action

Fish Shell is so intuitive that I didn’t need to read any instructions on how to use it. Once Fish Shell is on your computer, open it up and start typing.

As soon as Fish starts completing your command, e.g. “cd d” becomes cd dev (because it remembers you’ve been there before) you just hit the right arrow key on your keyboard and hit Enter to run the command.

In the following example, I’m navigating from my machine’s root directory to my Dev folder where I store my projects. From there I quickly navigate to levels from my techstacker folder to techstacker.com-2.0. I then rapidly start my server by typing “ga...” and Fish conveniently remembers that the full command is gatsby develop, saving me at least a couple of seconds of typing.

Fish Shell both auto-completes and auto-suggests in the sense that if you start typing cd X, it will suggest your most recent paths, which is awesome.

One of the most underappreciated aspects of using auto-completion tools (in general) is that typos are no longer an issue. It may only take you a few seconds to run several command line commands when you type manually, but if you’re a human you’ll make typos here and there, and those can cost several seconds of retyping. It all accumulates!

How to install Fish Shell on your Mac

If you’re using Homebrew you can quickly install Fish Shell with this command:

brew install fish

You can also go to Fish Shell’s website and download one of the installers.

Note: you don’t have to install Fish Shell on your computer, you can also just launch Fish Shell terminal via their app.


Has this been helpful to you?

You can support my work by sharing this article with others, or perhaps buy me a cup of coffee 😊

Kofi

Share & Discuss on