Skip to content

Instantly share code, notes, and snippets.

@bcmn
Last active April 9, 2018 07:49
Show Gist options
  • Save bcmn/221f4e18090a62c216a799c56c91862a to your computer and use it in GitHub Desktop.
Save bcmn/221f4e18090a62c216a799c56c91862a to your computer and use it in GitHub Desktop.
For when you finally miss POSIX... A macOS skeleton script to help you easily migrate from Fish Shell to Zsh.
brew install zsh zsh-completions zsh-autosuggestions
echo -e "\nfpath=(/usr/local/share/zsh-completions \$fpath)" >> ~/.zshrc
echo "source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
sed -i.old 's/^\(export ZSH_THEME=\).*$/\export ZSH_THEME="fishy"/' ~/.zshrc
# TODO: Convert fish history to zsh CSV format
if ! grep -Fxq "/usr/local/bin/zsh" /etc/shells
then
echo "\n/usr/local/bin/zsh" >> /etc/shells
fi
chsh -s /bin/zsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment