天天看點

安裝oh-my-zsh及一些插件

1、檢視系統的shell并更關為zsh

cat /etc/shells 如果沒有zsh請自行安裝 yum install -y zsh

chsh -s /bin/zsh

2、先clone oh-my-zsh 沒有網的話可以先下好壓縮包

curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh

     壓縮包可以自行在 ./oh-my-zsh下tools下找到install.sh

3、安裝這3個插件,個人目前就用到3個

1、(zsh-autosuggestions)https://github.com/zsh-users/zsh-autosuggestions     功能請看文檔,并實踐

git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions

之後把插件名稱添加至plugins裡 ,在 .zshrc (注意前面有點)裡面的54行左右

示例:plugins=(git autojump zsh-autosuggestions zsh-syntax-highlighting)

每次修改完 .zshrc 都需要source .zshrc

2、(autojump)https://github.com/wting/autojump 功能請看文檔,并實踐

git clone https://github.com/joelthelion/autojump.git

直接切換至autojump目錄./install.py(如果這裡沒裝python要裝,不過貌似現在都帶的)裝完會有帶下面的這種提示複制至 ./zshrc中 我是放在plugins下面的

[[ -s ~/.autojump/etc/profile.d/autojump.sh ]] && . ~/.autojump/etc/profile.d/autojump.sh      (有可能不一樣,就像我家腐竹長樹上一樣)

這個也需要添加至plugins

每次修改完 .zshrc 都需要source .zshrc

3、(zsh-syntax-highlighting)https://github.com/zsh-users/zsh-syntax-highlighting    功能請看文檔,并實踐

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

添加至plugins

每次修改完 .zshrc 都需要source .zshrc

我用的主題是candy,我是在secureCRT上 vim .zshrc ZSH_THEME 修改完之後source .zshrc

本文也是我從網上收集整理并修改的,也無恥的添加了原創(不曉得是不是這種内同應該視為轉載還是?如果是,請留言說下,我修改一下,謝謝)。。。因當時沒記連結,就不放連結了

繼續閱讀