I'm on OS X, but since this is terminal work I figured this was the best place to ask. I'm trying to get Sublime Text to work at the command line via subl
and having no luck. I ran ln -s <location of subl file in Applications; not part of $PATH> /usr/local/bin/subl
to create a link to it.
When I run ls
on /usr/local/bin
, I can see the subl
link there in the directory.
But when I try to run it, it tells me Command not found
. And if I try it with an absolute path by typing in /usr/local/bin/subl
, it tells me No such file or directory.
I'm not sure how to troubleshoot this. Ideas?
The output of readlink /usr/local/bin/subl
is
/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl
file /usr/local/bin/subl
? – Gilles 'SO- stop being evil' Jul 05 '15 at 22:37ldd /usr/local/bin/subl
andecho $PATH
? – eyoung100 Jul 05 '15 at 22:45ln -s
.ldd
exists for macs but I tried usingotool -L subl
at the internet's suggestion as a drop-in replacement and it just saidNo such file or directory.
– temporary_user_name Jul 05 '15 at 22:48readlink /usr/local/bin/subl
(without munging)? – Gilles 'SO- stop being evil' Jul 05 '15 at 23:01/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl
– temporary_user_name Jul 05 '15 at 23:05eval "$(readlink /usr/local/bin/subl)"
works perfectly. Could always just create an alias to that but I would love to know why this is happening. – temporary_user_name Jul 05 '15 at 23:13