Mac下安装Oh My ZSH
github地址:https://github.com/robbyrussell/oh-my-zsh
1、通过wget方式下载安装
wget --no-check-certificate http://install.ohmyz.sh -O - | sh
2、手动安装
下载:git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
备份(可选):cp ~/.zshrc ~/.zshrc.orig
创建新文件:cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
设置zsh为默认shell:chsh -s /bin/zsh
安装完成后进行配置,打开.zshrc文件
vim .zshrc

在这里进行别名设置,希望用sublime text 2打开html文件和ruby文件,系统默认没有sublime命令,需要进行设置。
官方文档:http://www.sublimetext.com/docs/2/osx_command_line.html,通过
ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl
来链接subl命令。
但是不能创建,因此需要换一种方式进行创建。
ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime
文档为:https://gist.github.com/artero/1236170
在这里需要保证PATH中有/usr/local/bin路径。
完成后在命令行中输入文件名即可在Sublime Text 2中打开。
参考自:http://gilesbutler.co.uk/oh-my-zsh-sublime-text-2-command-line/
http://macshuo.com/?p=676
github地址:https://github.com/robbyrussell/oh-my-zsh
1、通过wget方式下载安装
wget --no-check-certificate http://install.ohmyz.sh -O - | sh
2、手动安装
下载:git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
备份(可选):cp ~/.zshrc ~/.zshrc.orig
创建新文件:cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
设置zsh为默认shell:chsh -s /bin/zsh
安装完成后进行配置,打开.zshrc文件
vim .zshrc
在这里进行别名设置,希望用sublime text 2打开html文件和ruby文件,系统默认没有sublime命令,需要进行设置。
官方文档:http://www.sublimetext.com/docs/2/osx_command_line.html,通过
ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl
来链接subl命令。
但是不能创建,因此需要换一种方式进行创建。
ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime
文档为:https://gist.github.com/artero/1236170
在这里需要保证PATH中有/usr/local/bin路径。
完成后在命令行中输入文件名即可在Sublime Text 2中打开。
参考自:http://gilesbutler.co.uk/oh-my-zsh-sublime-text-2-command-line/
http://macshuo.com/?p=676