天天看點

iTerm2+Oh My Zsh最佳終端體驗安裝Oh my zsh安裝PowerLine安裝PowerFonts

安裝Oh my zsh

安裝方法有兩種,可以使用curl或wget,看自己環境或喜好:

# curl 安裝方式
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"      
# wget 安裝方式
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"      
iTerm2+Oh My Zsh最佳終端體驗安裝Oh my zsh安裝PowerLine安裝PowerFonts

安裝PowerLine

pip install powerline-status --user      

安裝PowerFonts

# git clone
git clone https://github.com/powerline/fonts.git --depth=1
# cd to folder
cd fonts
# run install shell
./install.sh      
iTerm2+Oh My Zsh最佳終端體驗安裝Oh my zsh安裝PowerLine安裝PowerFonts

GitHub 太慢的話,可直接

下載下傳字型

,下載下傳完成直接點選即開始安裝。

iTerm2+Oh My Zsh最佳終端體驗安裝Oh my zsh安裝PowerLine安裝PowerFonts

安裝好字型庫後,設定iTerm2的字型:

iTerm2 -> Preferences -> Profiles -> Text

在Font區域

iTerm2+Oh My Zsh最佳終端體驗安裝Oh my zsh安裝PowerLine安裝PowerFonts

找到plugins,此時plugins中應該已經有了git,我們需要把高亮插件也加上。zsh-syntax-highlighting必須在最後一個。

iTerm2+Oh My Zsh最佳終端體驗安裝Oh my zsh安裝PowerLine安裝PowerFonts

看最終效果圖

iTerm2+Oh My Zsh最佳終端體驗安裝Oh my zsh安裝PowerLine安裝PowerFonts

參考