mac默认的shell是bash,虽然功能强大,但是在终端操作过程中开发体验并不是很好,特别是在做git指令操作的过程中。根据笔者多年的开发习惯,特推荐 Oh My Zsh。
Oh My Zsh简介
Oh My Zsh.pngOh My Zsh is a delightful, open source, community-driven framework for managing your Zsh configuration. It comes bundled with thousands of helpful functions, helpers, plugins, themes, and a few things that make you shout...
如何安装 Oh My Zsh
一、curl安装
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
二、wget安装
sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
三、源码安装
git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
另外,也可以通过homebrew进行安装,如何安装homebrew 可以看 Mac开发第一步:安装Homebrew。
配置与切换
- 备份之前的zshrc配置
cp ~/.zshrc ~/.zshrc.backup
- 修改配置
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
- 切换shell
chsh -s /bin/zsh
- 查看成功
➜ ~ zsh --version
zsh 5.5.1 (x86_64-apple-darwin17.5.0)
➜ ~
享受飞跃吧:
oh-my-sh-haha.jpg
参考
Oh My Zsh官网:https://ohmyz.sh/
网友评论