首先确保你安装了brew,未安装的请参考此文:Mac安装brew
brew install zsh zsh-completions
curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
or
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
查看所有已安装shell
cat /etc/shells
确保zsh在其中,然后切换shell
chsh -s /bin/zsh
zsh
vim ~/.zshrc
加入或修改以下内容,可以找到ZSH_THEME,以及plugins。前者用于更换主题,后者用于安装插件,默认会安装git,根据需求添加或更改。
ZSH_THEME=pygmalion
plugins=(git colored-man colorize github jira vagrant virtualenv pip python brew osx zsh-syntax-highlighting)
立即载入
确保你当前shell是zsh,你可以运行echo $SHELL
,如果不是,请运行zsh
切换。
source ~/.zshrc
viencoding.com版权所有,允许转载,但转载请注明出处和原文链接: https://viencoding.com/article/40