iTerm2 是专为MacOS打造的命令函应用, 完全免费. iterm2

oh-my-zsh

安装

GitHub - ohmyzsh/ohmyzsh

sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

zsh的配置文件位于~/.zshrc

主题

vi 打开 .zshrc vi ~/.zshrc

#ZSH_THEME="robbyrussell"  如果有默认主题则注释掉
ZSH_THEME="ys"

agnoster 主题

一些主题需要下载字体才能支持. ::agnoster:: 就是这么一个主题. 安装字体:

# clone
git clone https://github.com/powerline/fonts.git --depth=1
# install
cd fonts
./install.sh
# clean-up a bit
cd ..
rm -rf fonts

Preferences > Profiles > Text > Change FontUse a different font for non-ASCii Text 打上勾 pref

语法高亮

  1. homebrew 安装 zsh-syntax-highlighting
    brew install zsh-syntax-highlighting
    
  2. 步骤1中安装过程最后会返回设置命令语句, vi ~/.zshrc 插入
    source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
    
  3. 激活配置
    source ~/.zshrc
    

Status Bar

Preference > Profile > SessionStatus bar enabled 打钩 pref2

选择Configure Status Bar 在窗口里拖动你需要的内容到下方的空白处 pref3

效果

pref4