配置Mac漂亮的Shell--Iterm2+OhMyZSH+Agnoster

安装包管理器


首先当然是解决包管理的问题,Mac下面是Homebrew的天下了

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

安装iterm2


brew cask install iterm2

安装字符集

链接地址https://gist.githubusercontent.com/qrush/1595572/raw/417a3fa36e35ca91d6d23ac961071094c26e5fad/Menlo-Powerline.otf
下载后图形化安装,没啥难点,安装好后修改下iterm2的字体
1070321-20180606160500919-1186106826.png

iterm2 配色调整


选择Solarized Dark
1070321-20180606160524175-1366067865.png

以上都没有啥问题


这些都是一条命令的事,没啥error可以修补的,一般不会出错哦。

安装ohmyzsh


sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"  #curl安装
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"   #wget安装
https://github.com/robbyrussell/oh-my-zsh  #github的连接

安装成功后,用vim打开隐藏文件 .zshrc ,修改主题为 agnoster:

ZSH_THEME="agnoster"

如果上面有问题,在安装字体后


cd ~/.oh-my-zsh/
git checkout d6a36b1 agnoster.zsh-theme

安装高亮和自动补全


git clone git://github.com/zsh-users/zsh-syntax-highlighting.git  ~/
git clone git://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/plugins/zsh-autosuggestions
或者使用incr也可以

修改.zshrc


plugins=(zsh-syntax-highlighting)
source ~/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source ~/.oh-my-zsh/plugins/incr/incr*.zsh

然后重新引导.zshrc配置文件

source ~/.zshrc

然后重启iterm2,效果如下
1070321-20180606162243378-1001779423.png

转载于:https://www.cnblogs.com/KevinGeorge/p/9145784.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值