➜ ~ 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