安装Oh my zsh
安装方法有两种,可以使用curl或wget,看自己环境或喜好:
# curl 安装方式 sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# wget 安装方式 sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
pip install powerline-status --user安装PowerFonts
# git clone git clone https://github.com/powerline/fonts.git --depth=1 # cd to folder cd fonts # run install shell ./install.sh
GitHub 太慢的话,可直接下载字体,下载完成直接点击即开始安装。
安装好字体库后,设置iTerm2的字体: iTerm2 -> Preferences -> Profiles -> Text 在Font区域
-
找到plugins,此时plugins中应该已经有了git,我们需要把高亮插件也加上。zsh-syntax-highlighting必须在最后一个。
-
看最终效果图
参考
- https://segmentfault.com/a/1190000014992947