Original Sublime 2 instruction for enabling editor to launch from command line:
ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl
do not work in Mountain Lion.
Create the ~/bin
directory if it doesn't already exist:
mkdir ~/bin
Then run the ln
again. Make sure that directory is added to your $PATH
by adding this to the ~/.bashrc file, creating it if it doesn't exist:
export PATH="$PATH:~/bin"
If you don't use bash, use your manual to figure out how to add a directory to your $PATH
variable.
This is actually what the instructions say:
The first task is to make a symlink to subl. Assuming you've placed Sublime Text 2 in the Applications folder, and that you have a ~/bin directory in your path, you can run: [snip]
This implies you need to create the ~/bin
directory if it doesn't exist, and add it to your $PATH
if it is not there already. The above instructions do exactly that.
If you don't like that ugly bin
folder in your pretty home folder, you can use chflags
to make it disappear from the Finder:
chflags hidden ~/bin
Change target directory to system folder /usr/bin and use sudo for admin rights.
sudo ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /bin/subl
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With