建議先安裝好 iTerm2 ,本文使用 iTerm2 來配置,參考: iTerm 2 配置

安裝 oh-my-zsh

https://ohmyz.sh/#install

sh -c "$(curl -fsSL <https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh>)"

設置實用擴充功能

這個步驟將會安裝兩個實用的擴充功能,建議安裝

安裝 zsh-autosuggestions

https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md

git clone <https://github.com/zsh-users/zsh-autosuggestions> ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

先不用在~/.zshrc 裡面設置, 裝完其他擴充功能後再一起設置就好

然後在 ~/.zshrc 裡面的plugins加上這段

安裝 zsh-syntax-highlighting

https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/INSTALL.md

git clone <https://github.com/zsh-users/zsh-syntax-highlighting.git> ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

啟用擴充功能