macos下安裝oh-my-zsh和zsh-autosuggestion

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

二、https://github.com/zsh-users/zsh-autosuggestionsblog

三、https://github.com/robbyrussell/oh-my-zsh

相關文章
相關標籤/搜索