Sublime Forum

Problem with sublime text command line

#1

I ran this:
ln -s “/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl” /usr/local/bin/sublime

I then ran this
sublime ~/Documents/

It opened a new window, but it didn’t have my documents. This works with TextMate.

1 Like

#2

Did you make sure the side bar is visible? That command will open the folder, but without the side bar the window would just appear empty.

0 Likes

#3

I did just now, yes.

I have attached a screenshot.

0 Likes

#4

Does this works:

sublime -a ~/Documents: should add the current directory to the current ST windows

0 Likes

#5

No, it does not. I am using OS 10.13.

0 Likes

#6

Are you by any chance trying to do this as root?

0 Likes

#7

No, I am not doing it as root.

0 Likes

#8

-It does not work on a 2015 MacBook with High Sierra (10.13).

-It works on my other work laptop that doesn’t have High Sierra: a 2017 MacBook with Sierra (10.12.6).

I am not logged in as root on either machine. I opened the sidebar in both instances. The command line functionality works with the older 10.12 OS, but not 10.13.

0 Likes

#9

My 2015 MBP on 10.12.6 has this issue to. None of the commands work to open a file or directory. They simply launch Sublime.

0 Likes

#10

Same issue here. Since the upgrade the command-line utility no longer works. The ad-hoc creation of project windows by passing files or directories (e.g. shortcut subl .) no longer works. Also, the use of Sublime for drafting commits messages no longer works (e.g. git config core.editor = subl -n -w).

Instead, any invocation of subl on the command-line just results in a context switch to a currently open Sublime Text window or, if none open, blank launching of the program.

Possibly related to this: Links within Sublime that are meant to open a web browser (e.g. “Upgrade license”) also no longer work. They switch to the default browser and open a blank tab, but they don’t navigate to any url.

0 Likes

#11

I retested this and it now works!

I upgraded my OS to 10.13.2, released Jan 9th.

This was my only complaint with High Sierra, so I will upgrade my work computer also. Thanks for the reassurance it wasn’t just me.

0 Likes