Mac下iTerm2主题配置

一、安装Oh My Zsh

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

二、替换OMZ主题

主题大全:https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
选择agnster主题:https://github.com/agnoster/agnoster-zsh-theme
安装完成后操作
oh my zsh提供了数十种主题,相关文件在~/.oh-my-zsh/themes目录下
  • vi ./zshrc
  • 修改 ZSH_THEME=“robbyrussell” 为 ZSH_THEME=“agnoster”
  • 重新打开iTerm
此时在线上路径时可能会出现乱码,出现问好(?)的情况,需要安装对应的字体 Powerline

三、安装Powerline字体

安装Powerline-patched font:https://github.com/powerline/fonts
// 克隆
git clone git@github.com:powerline/fonts.git
  • cd fonts
  • 执行安装命令:./install.sh

四、设置iTerm字体

在这里插入图片描述
在这里插入图片描述

手工安装

如果网络被强,获取不到githubusercontent内容,可手工下载仓库中的内容,并copy到用户根目录中,在重复上述操作即可。
# 从git上把oh-my-zsh clone下来到根目录下
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
# 再在根目录下copy一份.zshrc配置
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

版权声明:本文为CSDN_Hss原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。