➜ ~ cd ~ ➜ ~ git clone https://github.com/powerline/fonts.git --depth=1 ➜ ~ cd fonts ➜ ~ ./install.sh ➜ ~ cd .. ➜ ~ rm -rf fonts
詳細說明,點擊這裏 https://github.com/powerline/fonts。git
➜ ~ vim ~/.zshrc # 修改這裏切換主題 #ZSH_THEME="robbyrussell" ZSH_THEME="agnoster" # agnoster 主題設置:隱藏當前用戶 #prompt_context() { # DEFAULT_USER="sunqiang" #} # agnoster 主題設置:只顯示當前用戶名 prompt_context() { if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then prompt_segment black default "%(!.%{%F{yellow}%}.)$USER" fi }
最後徹底關閉並從新打開 iTerm 生效。github