Hero image for: Improve your shell using fish and oh my fish

Improve your shell using fish and oh my fish

By Jesus Manuel Olivas ● Head of Products | January 27th, 2016

This will be a short post to answer a recurring question about my shell configuration, when doing presentations, sharing a video or screenshot.

@jmolivas what is it that is showing your previous command as you type in the terminal?

— David Hernandez (@davidnarrabilis) February 18, 2015

@jmolivas the visual autocomplete in your @drupalconsole lightning talk is nice - what extra shell setup is going on there?

— Chris Burgess (@xurizaemon) February 23, 2015

@jmolivas what is your zsh plugin or theme in order to get the path like ~/d/d/m in your terminal ?

— Kevin Gautreau (@Kgaut) December 5, 2015

What is my setup?

Installing iTerm2

Not rocket science just download, unzip and drag to your Applications directory.

Installing fish (using brew)

You can choose between downloading an installer, an application or using brew.

This is the instruction to install in your system using brew.

brew install fish
view rawinstall-fish.sh hosted with ❤ by GitHub

Switching to fish

If you wish to use fish as your default shell, use the following command.

chsh -s /usr/local/bin/fish
view rawswitch-shell.sh hosted with ❤ by GitHub

Installing Oh My Fish

Once you have fish installed you will need to execute curl to download it.

curl -L https://github.com/oh-my-fish/oh-my-fish/raw/master/bin/install | fish

Installing the agnoster theme

The previous installation instruction enabled a new command omf that you will need to use to download the agnoster theme.

omf theme agnoster
view rawinstall-theme.sh hosted with ❤ by GitHub

Fixing the font issue

In order to have a better experience using the agnoster theme, you may need to download Menlo font patched to work with Powerline. You can download from this Github repository https://github.com/abertsch/Menlo-for-Powerline

Now you need to complete this two steps:

  • Unzip and double-click the font in Finder and select Install this font.
  • For use with iTerm, change your settings. Preferences > Profiles > Text.

Menlo for Powerline

Make sure you set Non-ASCII font smaller than Regular Font in order to make Non-ASCII characters looks better.

This is an image with the final result.

Fish shell