在MAC环境下自定义shell终端的配色方案。
iterm2 + oh my zsh

安装iterm2

下载地址

安装oh-my-zsh

curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh

安装完成后,切换dash:

chsh -s /bin/zsh

切换为原来的dash:
chsh -s /bin/bash

卸载oh-my-zsh:
uninstall_oh_my_zsh

设置配色方案

使用 Solarized 配色方案:

#下载
git clone git://github.com/altercation/solarized.git
#配置
cd solarized
cd vim-colors-solarized/colors
mkdir -p ~/.vim/colors
cp solarized.vim ~/.vim/colors/


#更改vim配色方案,和终端保持一致
vi ~/.vimrc
#写入
syntax enable
set background=dark
colorscheme solarized

#配置ls高亮
#安装coreutils
brew install coreutils
vi ~/.bash_profile
#写入
export CLICOLOR=1

设置语法高亮

使用 zsh-syntax-highlighting

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git

echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc

source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

设置主题

使用主题 agnoster

此款主题需要字体

下载地址

#更改配置文件
vi ~/.zshrc
#写入
ZSH_THEME="agnoster"

成果

on-my-zsh
on-my-zsh

参考:
在 Mac OS X 终端里使用 Solarized 配色方案
iTerm 2 && Oh My Zsh【DIY教程——亲身体验过程】
Mac下iTerm 2语法高亮配置及附带美化