zsh-autosuggestion
是oh-my-zsh
的一個插件,作用基本上是根據(jù)歷史輸入指令的記錄即時的提示梯捕,能夠很大的提高效率。
一、安裝iTerm2 終端工具
直接打開ITerm2官網(wǎng)(https://www.iterm2.com/)直接點(diǎn)擊Download下載安裝即可怔毛。
二、安裝oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
-
你很有可能遇到如下報錯信息:
-
解決辦法
在https://www.ipaddress.com/查詢raw.githubusercontent.com
的真實(shí)IP腾降。(IP可能已改變拣度,請重新查詢)
然后在hosts中聲明其對應(yīng)ip
sudo vim /etc/hosts
添加如下內(nèi)容:
199.232.68.133 raw.githubusercontent.com
重新執(zhí)行
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
耐心等待即可。
三螃壤、安裝zsh-autosuggestions
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
1.編輯~/.zshrc文件
vim ~/.zshrc
#找到plugins=(git)這一行抗果,然后再添加autosuggestions
plugins=(git zsh-autosuggestions)