Sublime Forum

Subl command is working for opening folders but not individual files after ST4 upgrade

#1

Mac version: 10.14.6
Sublime Version: 4126

Context:
I just upgraded to the latest version of Sublime and now I cannot open files using the subl {$filename} command. Folders are working correctly. It looks the files are opening in an incorrect directory and no window is displaying.

What’s working:
Using the subl command, I am able to correctly open a directory using subl {$directoryname} or subl . within the directory path. It opens a Sublime window with that directory correctly. Once that directory window is open, I can individually open files using terminal commands subl {$filename}, and it opens those files correctly.

What’s not working:
The subl command will not let me open that same file above if I do not open the directory first. If I do not run subl . first and only run subl {$filename}, no window pops up. However, when I right-click the Sublime icon in my doc, the file is listed as {$filename} - {$directory that does not seem to exist on my computer}.

What I tried:
I don’t think this was what I needed, but some people in the forums recommended deleting and recreating the symlink, which I did using ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl. The subl command is correctly pointing to the sublime text app.

Do you have any idea why it might be trying to open the file in a different directory? Thanks for your help.

0 Likes