最终效果
![]()
⚠️ 注意:本文是以 zsh + iTerm 为基础进行说明,与此环境不一致的可参照本文根据具体环境进行修改。
步骤
1. 安装主题需要的 powerline 字体文件
➜ cd ~ ➜ git clone https://github.com/powerline/fonts.git --depth=1 ➜ cd fonts ➜ ./install.sh ➜ cd .. ➜ rm -rf fonts
|
详细说明,点击这里。
2. 修改 zsh 配置
➜ vim ~/.zshrc
ZSH_THEME="agnoster"
prompt_context() { if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then prompt_segment black default "%{$fg[white]%}" fi }
|
3. 修改 iTerm 设置
修改如下图的设置,最后完全关闭并重新打开 iTerm 生效。
![]()