Mac安装zsh&oh my zsh

来源:互联网 发布:正规的网络赚钱平台 编辑:程序博客网 时间:2024/06/07 06:36

安装brew

首先确保你安装了brew,未安装的请参考此文:http://blog.csdn.net/qq_32457355/article/details/72567478

安装zsh

brew install zsh zsh-completions

安装oh my zsh

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

查看所有已安装shell

cat /etc/shells

确保zsh在其中,然后切换shell

chsh -s /bin/zshzsh

更换主题&安装插件

vim ~/.zshrc

加入或修改以下内容,可以找到ZSH_THEME,以及plugins。前者用于更换主题,后者用于安装插件,默认会安装git,根据需求添加或更改。

ZSH_THEME=pygmalionplugins=(git colored-man colorize github jira vagrant virtualenv pip python brew osx zsh-syntax-highlighting)

立即载入
确保你当前shell是zsh,你可以运行echo $SHELL ,如果不是,请运行zsh 切换。

source ~/.zshrc
原创粉丝点击