Last active
November 25, 2020 08:41
-
-
Save skyyuan/6362112 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
安装zsh | |
brew install zsh | |
设置zsh为默认shell | |
mate /etc/shells | |
在文末增加: | |
/usr/local/bin/zsh | |
将zsh设置为默认的Shell: | |
chsh -s /usr/local/bin/zsh | |
重新打动iterm2。 | |
配置zsh | |
目前流行的安装配置文件有2个.一个是官网的grml-zsh-config;另一个是oh-my-zsh. | |
Rails开发者一般推荐后者.安装方式如下: | |
cd ~/. #进入根目录 | |
#自动安装脚本 | |
wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh | |
然后修改.zshrc,将原来.bash_profile与.profile中的自定义内容导入过来. 比如支持rvm,应在.zshrc增加: | |
[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm | |
并自定义.zhsrc文件, 比如更换theme.完整的theme方案列表在这里 | |
export ZSH_THEME="robbyrussell" | |
整合rails3开发常用插件 | |
安装git,rails,ruby,rvm等rails开发常用的插件.请注意,oh-my-zsh的plugins目录下面有rails与rails3两个,如果希望支持rails3,是: | |
plugins=(rails3 rails git textmate ruby rvm gem git github brew bundler textmate pow) | |
这些插件的用法参考oh-my-zsh的wiki | |
如需查看已经安装或者安装plugins,在这里: | |
cd ~/.oh-my-zsh/plugins | |
修改完之后,重新加载: | |
source ~/.zshrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment