zsh command line
Terminal 樣式設定
Last updated
Was this helpful?
Terminal 樣式設定
Last updated
Was this helpful?
先下載 nerd.terminal
打開 terminal.app -> 終端機 -> 偏好設定
點左下角齒輪 -> 匯入 nerd.terminal
將 nerd 設定為預設值
用 homebrew 安裝
brew install zsh
並把 zsh 設定為你的預設 shell
sudo sh -c "echo $(which zsh) >> /etc/shells"
chsh -s $(which zsh)
安裝 on-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
~/.zshrc
ZSH_THEME="powerlevel9k/powerlevel9k"
# command line 左邊想顯示的內容
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir dir_writable vcs) # <= left prompt 設了 "dir vcs"
# command line 右邊想顯示的內容
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status time) # <= right prompt 設了 "status time"
POWERLEVEL9K_MODE='nerdfont-complete'
字型檔已無法透過 Homebrew 下載,必須手動處理
解壓縮
打開 Spotlight,搜尋字體簿
點+匯入字型檔
打開 terminal.app -> 終端機 -> 偏好設定
選 nerd -> 字體 ->更改,選 Source Code Pro Nerd Font Complete