Sublime Forum

Open a Workpace from a cli script

#1

Has anyone figured out how to open a new Sublime window populated with a saved project from a script?

bash, batch, applescript, any script language really.

0 Likes

#2

just launch the .sublime-project with default program in your os.
e.g. in windows

start xyz.sublime-project

or on mac

open xyz.sublime-project
0 Likes

#3

I’m afraid that simply opens the project file (xyz.sublime-project) as text (tested Ubuntu/OSX from bash). It would be useful if you could open a window containing tabs of all of the files in the project’s workspace listing, with a specific file in that set focussed.

For instance if you could pass a sublime-workspace file to the the Sublime app as an argument… if that can be done I can’t seem to find the magic method, and nothing in the docs… yet. Still looking.

0 Likes

#4

As of 2165 .sublime-project files opened from the command line are opened as projects.

Run with --help to see the command line options.

0 Likes

#5

On WinXP at least, that doesn’t works. I run “sublime_text.exe --help” and: ST does not starts (as expected), but no help text gets printed into the console.

I used “busybox.exe strings sublime_text.exe > st2.txt” to figure out if there were command line switches at all.

0 Likes