Sublime Forum

How does the 'exec' command work?

#1

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.

<binding key="alt+x,alt+c" 
  command="exec '^(...*?):([0-9]*):?([0-9]*)' svn ci --message=&quot;automatic checkin&quot; '&quot;$File&quot;'"/>
0 Likes

#2

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:

  <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.

0 Likes

#3

Thanks, Jon. Works perfectly.

0 Likes