echo $SHELL
/bin/zsh
open ~/.zshrc
ZSH_THEME="agnoster"
open ~/.zshrc
plugins=(zsh-autosuggestions)
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=240'
open ~/.zshrc
DEFAULT_USER=yourname
brew install zsh-syntax-highlighting
open ~/.zshrc
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
資料來源:droppaper
powerline可以讓終端機更易讀,前面的文章《終端機提示符號外掛Powerline》說明如何在Linux上安裝,這邊則是說明如何安裝到麥金塔電腦上。
在安裝前先了解兩件事情,一個是powerline是用python寫出來的終端機外掛程式,另外一個是powerine需要一些特殊的字型。
首先,安裝powerline。這邊是用Mac本身系統的python(/usr/bin/python)來安裝。由於powerline是用python寫的套件,所以在這邊用pip這個套件管理程式來安裝:
curl https://bootstrap.pypa.io/get-pip.py | sudo python
pip install --user powerline-status
pip show powerline-status
git clone https://github.com/powerline/powerline.git
POWERLINE_PATH=~/Library/Python/2.7/lib/python/site-packages/
cp -r powerline/powerline/ $POWERLINE_PATH/powerline
cp -r powerline/scripts/ $POWERLINE_PATH/scripts
第1個指令是安裝pip,第2個指令則是安裝powerline、第3個指令則是確認安裝到哪邊。由於第2個安裝指令用了參數--user,因此powerline將會安裝到家目錄下面 /Users/使用者名稱/Library/Python/2.7/lib/python/site-packages
第4,5,6,7的指令是在設定powerline裡面的configuration,依序執行就是
安裝好powerline以後,再來安裝powerline所需要的字型
git clone https://github.com/powerline/fonts.git
cd fonts && ./install.sh
第1個指令是抓字型與安裝程式,第2個指令就是安裝字型到 /Users/使用者名稱/Library/Fonts
最後,修改 ~/.profile 加入下面兩行
POWERLINE_PATH=~/Library/Python/2.7/lib/python/site-packages/powerline
source $POWERLINE_PATH/bindings/bash/powerline.sh
另外,開啟終端機以後更改預設的顯示字型如下任一種
Source Code Pro for Powerline
Cousine for Powerline
開啟新的終端機就可以看到外掛powerline的終端機了
參考文獻:
《Install Powerline for Mac OS X》
《用Powerline美化你的Mac终端和Vim》
powerline可以讓終端機更易讀,前面的文章《終端機提示符號外掛Powerline》說明如何在Linux上安裝,這邊則是說明如何安裝到麥金塔電腦上。
在安裝前先了解兩件事情,一個是powerline是用python寫出來的終端機外掛程式,另外一個是powerine需要一些特殊的字型。
首先,安裝powerline。這邊是用Mac本身系統的python(/usr/bin/python)來安裝。由於powerline是用python寫的套件,所以在這邊用pip這個套件管理程式來安裝:
curl https://bootstrap.pypa.io/get-pip.py | sudo python
pip install --user powerline-status
pip show powerline-status
git clone https://github.com/powerline/powerline.git
POWERLINE_PATH=~/Library/Python/2.7/lib/python/site-packages/
cp -r powerline/powerline/ $POWERLINE_PATH/powerline
cp -r powerline/scripts/ $POWERLINE_PATH/scripts
第1個指令是安裝pip,第2個指令則是安裝powerline、第3個指令則是確認安裝到哪邊。由於第2個安裝指令用了參數--user,因此powerline將會安裝到家目錄下面 /Users/使用者名稱/Library/Python/2.7/lib/python/site-packages
第4,5,6,7的指令是在設定powerline裡面的configuration,依序執行就是
安裝好powerline以後,再來安裝powerline所需要的字型
git clone https://github.com/powerline/fonts.git
cd fonts && ./install.sh
第1個指令是抓字型與安裝程式,第2個指令就是安裝字型到 /Users/使用者名稱/Library/Fonts
最後,修改 ~/.profile 加入下面兩行
POWERLINE_PATH=~/Library/Python/2.7/lib/python/site-packages/powerline
source $POWERLINE_PATH/bindings/bash/powerline.sh
另外,開啟終端機以後更改預設的顯示字型如下任一種
Source Code Pro for Powerline
Cousine for Powerline
開啟新的終端機就可以看到外掛powerline的終端機了
參考文獻:
《Install Powerline for Mac OS X》
《用Powerline美化你的Mac终端和Vim》
https://2formosa.blogspot.tw/2017/02/powerline-for-mac-os-x.html