- 安装 oh-my-zsh
在终端输入命令:
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- 安装自动补全插件
在终端输入命令:
cd ~/.oh-my-zsh/custom/plugins
git clone https://github.com/zsh-users/zsh-autosuggestions.git
- 安装命令高亮插件
在终端输入命令:
cd ~/.oh-my-zsh/custom/plugins
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
- 配置 .zshrc 文件
在 ~/.zshrc 中添加以下内容并保存
source ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
source ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
在 ~/.zshrc 中修改 plugins=(git) 为:
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
- 让配置生效
source ~/.zshrc