1:安装oh-my-zshgit
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
二、安装zsh-autosuggestionsgithub
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
三、编辑~/.zshrc文件segmentfault
找到plugins=(git)这一行,而后再添加autosuggestions,最后为:curl
plugins=(git zsh-autosuggestions)
四、从新打开命令行,固然你也能够source ./zshrc更新下你的zsh,这样你就能够使用oh-my-zsh的同时享受到autosuggestions带来的便利了.url
总结:spa
一、你若是分开设置oh-my-zsh和autosuggestions,那么你的terminal的autosuggestions不会起做用的,因此你要把autosuggestions做为zsh的插件放到~/.zsh/plugins/下面,而后再在~/.zshrc文件中加入这个插件plugins=(git zsh-autosuggestions)插件
参考资料:命令行
一、https://segmentfault.com/a/1190000002658335?_ea=438459code