Sometimes,if you want to use one editor,for example:Sublime text 2 or textmate,etc.you will hope you can use them in the terminal via use the short cmd.but maybe you will caught the command can not found error.
Now I record the way I am fix the issue that 'subl .' can not be found.
http://www.sublimetext.com/docs/2/osx_command_line.html
https://teamtreehouse.com/forum/ruby-on-rails-subl-command-not-found
If you read these two passages,you can fix it.
Update:
Today I try the way above, but can not fix the issue, at last I have used cmd:
ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /bin/subl
use
sudo to do it, the issue fixed.
Reference Link:
http://www.kadrmasconcepts.com/blog/2012/02/08/sublime-from-the-command-line/
更新:
如果是新的Mac OS X,大概在10.11.3的话,之前的方式是会失败的,由于新系统有Rootless机制,导致/usr/bin 这个目录根本不可写入,可以把这个放到另外的目录链接中,如: ```/usr/local/bin/subl```,可以通过```echo $PATH``` 知道有哪学目录是可以的。
sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
Thanks,
Blues