alias subl=\''/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl'\'然后subl 要打开的文件名即可但是这种方法在关闭终端窗口后就不可用了,想要一直使用应当将环境变量加到配置文件中.
alias subl=\''/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl'\'