- 首先需要安装oh-my-zsh
sh -c "$(wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
- 执行脚本
./install.sh
3.下载插件
git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
4.把插件名称加入 oh-my-zsh 插件列表
# 把插件名称加入插件列表
gedit ~/.zshrc
把下面两句添加到文件中去
plugins=(zsh-autosuggestions)
plugins=(git zsh-autosuggestions)
5.重新加载zsh
source ~/.zshrc
附效果图:
像这种一大串命令的,打出./就能获得提示功能,节省开发时间
![](https://img-blog.csdnimg.cn/img_convert/2845ff3b9db1190fa904beb0dd523b9a.png)