Home Download Buy Blog Forum Support

How does the 'exec' command work?

How does the 'exec' command work?

Postby SteveCooperOrg on Mon Jun 22, 2009 10:16 pm

Hi.

I'm trying to fix a key binding I've got which has stopped working recently. All it does is a subversion commit with a default message. But something's gone wrong with the exec command. This has worked in the past, and I'm not sure where to go look for further info.

Code: Select all

<binding key="alt+x,alt+c"
  command="exec '^(...*?):([0-9]*):?([0-9]*)' svn ci --message=&quot;automatic checkin&quot; '&quot;$File&quot;'"/>
Maybe what you're looking for is at the http://www.sublimetextwiki.com
SteveCooperOrg
 
Posts: 193
Joined: Thu Mar 20, 2008 9:53 am

Re: How does the 'exec' command work?

Postby jps on Mon Jun 22, 2009 10:53 pm

The command isn't passed directly to windows, it has to be run through the command parser first, which means that quotes will get eaten, so you'll either need to wrap the --message portion in a set of quotes that can be eaten without any issues, or you'll need to escape the quotes. This version should work:

Code: Select all
  <binding key="f8"
  command="exec '^(...*?):([0-9]*):?([0-9]*)' svn ci '--message=&quot;automatic checkin&quot;' '&quot;$File&quot;'"/>


You can see how the command is interpreted by looking in the console afterwards.
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: How does the 'exec' command work?

Postby SteveCooperOrg on Wed Jun 24, 2009 8:27 pm

Thanks, Jon. Works perfectly.
Maybe what you're looking for is at the http://www.sublimetextwiki.com
SteveCooperOrg
 
Posts: 193
Joined: Thu Mar 20, 2008 9:53 am


Return to Plugin Development

Who is online

Users browsing this forum: Yahoo [Bot] and 10 guests