I have always used ZSH on Mac. There are many ways to customize ZSH. Recently, I felt that my shell was extremely slow. I had experimented with many ZSH plugins and themes. After testing a few options, I decided to switch to the Fish shell. This was not as straightforward as I expected, so I decided to write a blog post about it.
Installing Homebrew and Fish Shell
If you don’t have Homebrew, install it by following the instructions on their website. Once Homebrew is set up, you can install the Fish shell by opening your terminal and running:
brew install fish
Making Fish the Default Shell
To make Fish your default shell, you’ll need to follow a few important steps. First, verify the Fish path with which fish
. The path is likely /opt/homebrew/bin/fish
. Next, you need to add Fish to the list of known shells, which is a crucial step that’s often overlooked:
sudo sh -c 'echo /opt/homebrew/bin/fish >> /etc/shells'
After adding Fish to the shells list, change your default shell:
chsh -s /opt/homebrew/bin/fish
Finally, restart your terminal to activate the new shell.
Setting up Starship (Optional)
Fish does not require much additional setup, but you can optionally enhance it with Starship for a beautiful and fast prompt:
curl -sS https://starship.rs/install.sh | sh
echo 'starship init fish | source' >> ~/.config/fish/config.fish
VS Code Integration
To use Fish as your default terminal in VS Code, update your VS Code settings:
"terminal.integrated.defaultProfile.osx": "fish"