如何使用Oh My Zsh让你的MAC终端美丽起来
博客说明
文章所涉及的资料来自互联网整理和个人总结,意在于个人学习和经验汇总,如有什么地方侵权,请联系本人删除,谢谢!
说明
使用mac终端的时候,感觉不是很好用,至少样子不是很好用,所以得要去给它买一件衣服穿穿
看他原来的样子

好看吗?不好看吧,看着眼睛痛吗?痛吧
查看系统的shell
如果你和我一样有着强迫症,所有软件都要使用新的话,那么你的mac现在的shell应该是zsh,是的没错,别问我怎么知道的,问就是我看的,呢

当然有个命令可以看
dscl . -read /Users/$USER UserShell

至于为什么要使用这个,是因为我们的oh My Zsh插件需要这个版本的shell
安装oh My Zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
看到这个大大的标,说明我们走在了即将成功的道路上了

编辑配置
编辑配置文件
vim ~/.zshrc

在这个网址里面可以随便选择一个主题
https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
应用配置文件
source ~/.zshrc

效果像这样,不过感觉有点怪怪的,因为每次打开的时候都弹出来一大推,强迫症表示不能接受
去除前面的提示
其实吧这个问题,它给我们提示的也比较明显,我们在配置文件里面加入一段配置
ZSH_DISABLE_COMPFIX=true

现在来看看就好啦,修改配置之后记得要应用配置哟

修改终端的大小
可以在这里自定义配置

我的就是这个样子了

安装插件
下载自动补全的插件
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions

修改配置文件,找到plugins=(git)这一行,做如下修改

plugins=(git zsh-syntax-highlighting)
应用之后实现类似的效果

更多的玩法可以自定义哟
感谢
万能的网络
以及勤劳的自己
网友评论