1

sI cannot make alias 'sublime' to work suing

ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" ~/bin/subl

I checked path:

/Applications/Sublime Text.app/Contents/SharedSupport/bin/

$ls- la

total 0

drwxr-xr-x 2 ks admin 68 Jan 19 11:22 .

drwxr-xr-x 3 ks admin 102 Dec 16 21:25 ..

This is what I tired to do:

  1. open file using subl
  2. $ cd subl

-bash: cd: subl: No such file or directory

  1. $ open subl

The file /Applications/Sublime Text.app/Contents/SharedSupport/bin/subl does not exist.

  1. $ subl --help

-bash: subl: command not found

Raj
  • 22,346
  • 14
  • 99
  • 142
Katarzyna
  • 1,712
  • 2
  • 11
  • 14
  • If the image content isn't there then something happened during the install; that's where `subl` is. In any case, this isn't programming-related. – Dave Newton Jan 21 '14 at 12:53
  • Great, thanks! I just reinstalled Sublime Text, now subl file IS in the folder. After this fix I followed >http://stackoverflow.com/questions/16199581/sublime-text-3-subl-command finally it works! – Katarzyna Jan 21 '14 at 15:59

3 Answers3

0

If it is still isn't working after you created the symlink, the file might be quarantined. To check, open a terminal and get yourself to the directory that subl is in. Once you are there, check the extended permissions by typing:

xatt subl

If you see com.apple.quarantine, your file is quarantined. To remove the quarantine do ...

xattr -d com.apple.quarantine my_jar.jar

Cindy Conway
  • 1,814
  • 3
  • 18
  • 19
0
ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl

Should do the trick. See this post for additional info Sublime Text 3 and Terminal prompt for OS X Mavericks?

Community
  • 1
  • 1
Ali Cirik
  • 1,475
  • 13
  • 21
-1

few small things you can try

sudomkdir /usr/local

sudomkdir /usr/local/bin

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

remember to change the sublime text version to that which you have installed ( I recommend 2/3, not the first one)

Usage in Terminal:

(for directory you're currently in) subl .

(any other directory) subl ~/Documents/example.txt

Try:

mkdir /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

MattDMo
  • 100,794
  • 21
  • 241
  • 231
Sherwyn Goh
  • 1,352
  • 1
  • 10
  • 19
  • I have this directory but problem is with running subl, even from it's source path, where it is suppose to run from /Applications/Sublime Text.app/Contents/SharedSupport/bin/. For instance '/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl . ' does not work. – Katarzyna Jan 21 '14 at 05:03
  • 1. check that sublime text is within the applications folder – Sherwyn Goh Jan 21 '14 at 05:36
  • 2. open the contents and check for Contents/SharedSupport/bin ... etc – Sherwyn Goh Jan 21 '14 at 05:36
  • If they are not there, re-download and restart instructions – Sherwyn Goh Jan 21 '14 at 05:37
  • All the answers are in my post above :-) What else should I expect in Contents/SharedSupport/bin except what is listed? (btw Sublime Text works from finder.) In Applications I have sublime & Sublime Text.app – Katarzyna Jan 21 '14 at 05:48
  • I just re-read your usage of "subl"... Please use it like this "edited answer" – Sherwyn Goh Jan 21 '14 at 06:47
  • I think you did not read question carefully but thank you for attempt to help :-) – Katarzyna Jan 21 '14 at 16:01