Home:ALL Converter>cannot get sublime text 3 command line tools to work

cannot get sublime text 3 command line tools to work

Ask Time:2016-10-04T22:18:43         Author:Philip7899

Json Formatter

I had sublime text 2 command line tools working. When I downloaded Sublime Text 3, I could not get the command line tools to work. I've tried every answer here: Open Sublime Text from Terminal in macOS. When I type:

ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl  

I get back:

ln: /usr/local/bin/subl: File exists

but no matter what I do I still get back -bash: subl: command not found

Author:Philip7899,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/39854720/cannot-get-sublime-text-3-command-line-tools-to-work
Gerard Roche :

Remove the existing link first. It must be a broken link.\n\nList the contents of the directory and you'll see that the link is broken:\n\n$ ls -Al /usr/local/bin/\n\n\nOutput from the above command will show that the existing link is pointing to a non existing file. So delete the broken link:\n\n$ rm /usr/local/bin/subl\n\n\nYou might need to use sudo for the above command.\n\nNow you can create the symlink:\n\nln -s /Applications/Sublime\\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl\n",
2016-10-04T14:36:18
yy