Fish shell
Fish is the superior shell with sensible defaults.
Installation#
brew install fish
Find the path to the fish installation.
which fish
Add fish
to known shells.
/opt/homebrew/bin/fish
Restart terminal.
Set fish
as default shell
chsh -s /opt/homebrew/bin/fish
Add brew
to the $PATH
in your config.fish
file.
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.
if test -f (brew --prefix)/etc/brew-wrap.fish source (brew --prefix)/etc/brew-wrap.fishend
Fisher#
Fisher is a plugin manager for fish
.
Installation#
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#
fisher install IlanCosman/tide@v6
Configure the prompt.
tide configure
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.
brew install zoxide
Add zoxide init fish | source
to the end of your 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#
fisher install jethrokuan/z
bat#
bat is the better cat
alternative.
Installation#
brew install bat
fd#
fd is the better find
alternative.
Installation#
brew install fd
eza#
eza is the better ls
alternative.
Installation#
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
brew install fzf
Install fzf.fish
fisher install PatrickF1/fzf.fish
Usage#
Show command history: CTRL + R