Macos – Creating new bash command for Sublime Text 2

bashcommand linemacossublime-text-2

I'm trying to get Sublime Text 2's command line alias working.

The instructions make perfect sense: Run

ln -s "/Applications/Sublime Text" ~/bin/subl

So, in ~/bin, subl exists. However, even when I restart terminal, the command 'subl' is not found. The path specified to the application's subl file is correct, I've verified that. Logging out does not fix it.

Any help would be awesome!

Best Answer

Make sure ~/bin is added to your $PATH

Put this is your .bash_profile

export PATH

and it should be available next time you open a shell