Skip to content

Using a custom shell

not edited this page Jan 27, 2023 · 2 revisions

Recent versions of macOS now ship with zsh by default. There are several alternatives, but changing your default shell may potentially cause issues if you're not careful.

We can add a snippet to our .zshrc that checks for our desired shell, in this case "fish". If it exists, we execute fish within zsh.

if [ $(which fish) ]; then
	SHELL=$(which fish)
	[ -x $SHELL ] && exec $SHELL
fi

Alternatively, replace your default shell.

echo $(which fish) | sudo tee -a /etc/shells
chsh -s $(which fish)