Skip to content

Fish shell

Fish is the superior shell with sensible defaults.

Installation#

Terminal window
brew install fish

Find the path to the fish installation.

Terminal window
which fish

Add fish to known shells.

/etc/shells
/opt/homebrew/bin/fish

Restart terminal.

Set fish as default shell

Terminal window
chsh -s /opt/homebrew/bin/fish

Add brew to the $PATH in your config.fish file.

config.fish
fish_add_path /opt/homebrew/bin

It is (by default) safe to use fish_add_path in config.fish.

Wrap brew with Homebrew-file in your config.fish file.

config.fish
if test -f (brew --prefix)/etc/brew-wrap.fish
source (brew --prefix)/etc/brew-wrap.fish
end

Fisher#

Fisher is a plugin manager for fish.

Installation#

Terminal window
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher

Tide#

Tide is a customizable prompt for fish.

Installation#

Terminal window
fisher install IlanCosman/tide@v6

Configure the prompt.

Terminal window
tide configure

Install the recommended font.

Alternatives#

Starship is a cross-shell prompt that has a customizable config file. I use this when I need to use fnm for managing my node version.

zoxide#

zoxide makes changing directories a breeze by remembering the directories that you frequently visit and letting you fuzzy jump to the directory you want. But honestly, I use the Git Repos Raycast extension far more than zoxide.

Installation#

Install zoxide with brew.

Terminal window
brew install zoxide

Add zoxide init fish | source to the end of your config.fish.

~/.config/fish/config.fish
zoxide init fish | source

Some people like to change the command to run zoxide to cd using the —cmd flag. You can do this by changing the zoxide init command in your config.fish file but I found it annoying that fish would highlight the arguments to cd with red syntax highlighting.

Alternatives#

z is a native fish plugin that also lets you change directories with a snippet of the actual directory’s name.

Installation#

Terminal window
fisher install jethrokuan/z

bat#

bat is the better cat alternative.

Installation#

Terminal window
brew install bat

fd#

fd is the better find alternative.

Installation#

Terminal window
brew install fd

eza#

eza is the better ls alternative.

Installation#

Terminal window
brew install eza

fzf#

fzf is a general-purpose command-line fuzzy finder. I find this to be really useful for searching through my command history.

fzf.fish adds nice keybindings for fzf.

Installation#

Install fzf

Terminal window
brew install fzf

Install fzf.fish

Terminal window
fisher install PatrickF1/fzf.fish

Usage#

Show command history: CTRL + R