安装iterm2
https://iterm2.com/downloads.html
安装zsh
# mac
brew install zsh
# 变更默认shell
sudo chsh -s /bin/zsh
安装oh my zsh
oh my zsh Github官网
需要提前安装好zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
配置oh my zsh
安装zsh-autosuggestions
zsh-autosuggestions Github官方安装文档
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
在~/.zshrc文件中,添加插件名字
plugins=(
# other plugins...
zsh-autosuggestions
)
安装zsh-syntax-highlighting
zsh-syntax-highlighting Github官方安装文档
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc