[Mac] ITerm2:ohmyzsh的设置和状态条
iTerm2 是专为MacOS打造的命令函应用, 完全免费.
oh-my-zsh
安装
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 Font 里 Use a different font for non-ASCii Text 打上勾
语法高亮
- homebrew 安装 zsh-syntax-highlighting
brew install zsh-syntax-highlighting
- 步骤1中安装过程最后会返回设置命令语句, vi ~/.zshrc 插入
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
- 激活配置
source ~/.zshrc
Status Bar
Preference > Profile > Session 里 Status bar enabled 打钩
选择Configure Status Bar 在窗口里拖动你需要的内容到下方的空白处