Home Download Buy Blog Forum Support

Open a Workpace from a cli script

Open a Workpace from a cli script

Postby gelcode on Sat Jan 14, 2012 2:09 pm

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.
gelcode
 
Posts: 2
Joined: Sat Jan 14, 2012 2:02 pm

Re: Open a Workpace from a cli script

Postby freewizard on Sat Jan 14, 2012 5:17 pm

just launch the .sublime-project with default program in your os.
e.g. in windows
Code: Select all
start xyz.sublime-project

or on mac
Code: Select all
open xyz.sublime-project
using Sublime Text 3 dev in OS X 10.8
my ST packages: https://github.com/freewizard
freewizard
 
Posts: 36
Joined: Wed Feb 09, 2011 4:14 am

Re: Open a Workpace from a cli script

Postby gelcode on Sat Jan 14, 2012 9:11 pm

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.
gelcode
 
Posts: 2
Joined: Sat Jan 14, 2012 2:02 pm

Re: Open a Workpace from a cli script

Postby jps on Sun Jan 15, 2012 10:38 am

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

Run with --help to see the command line options.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: Open a Workpace from a cli script

Postby riffito on Mon Jan 16, 2012 1:01 pm

jps wrote:Run with --help to see the command line options.


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.
riffito
 
Posts: 17
Joined: Wed Dec 21, 2011 2:30 pm


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot], TheBlackDragon and 26 guests