How to set symlink short cut to Sublime Text 3 in terminal? [duplicate]
I'm using the ZSH bash https://github.com/robbyrussell/oh-my-zsh
I found and followed the directions here to symlink Sublime Text 3 to subl
https://www.sublimetext.com/docs/3/osx_command_line.html
The first task is to make a symlink to subl. Assuming you've placed Sublime Text in the Applications folder, and that you have a ~/bin directory in your path, you can run:
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" ~/bin/subl
First I had an error, not bin
folder in my user directory, so I went ahead and created an empty one, then the command worked.
However I got this error: zsh: command not found: subl
I also added the export path into my .zshrc file
export EDITOR='subl -w'
And I still get that error :(
Found the answer, I had to first change dir to /usr/local/bin
Then run:
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" subl
(For Sublime text 3)
https://stackoverflow.com/questions/11889484/command-subl-from-terminal-dont-work