Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


run_cmd can take list of commands as input #32

merged 1 commit into from

2 participants


patch to allow run_cmd to also take a list of commands. It allows configs such as:

        "sublimegdb_exec_cmd" : [
            "target remote localhost:3333",
            "monitor reset halt",
            "load build/ch.elf",
            "monitor reset halt",

Each command will have its own timeout. Maybe the timeout should apply to the whole set of commands? I'm not sure of the best behaviour

@quarnster quarnster merged commit a06b616 into from

I guess the largest problem is if it fails for some reason and then you are stuck with x commands times y seconds of timeout where Sublime Text 2's main thread is hung, but I consider that to be a separate problem not really related to this change. I'll open up a new issue tracking that.

Thanks for the pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 14, 2012
  1. @trsaunders

    run_cmd now accepts a list of commands in addition to the previous be…

    trsaunders authored
    …haviour (just a single string command)
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 0 deletions.
  1. +6 −0
@@ -1158,6 +1158,12 @@ def run_cmd(cmd, block=False, mimode=True, timeout=10):
timeoutcount = timeout/0.001
+ ### handle a list of commands by recursively calling run_cmd
+ if isinstance(cmd, list):
+ for c in cmd:
+ run_cmd(c, block, mimode, timeout)
+ return count
if mimode:
count = count + 1
cmd = "%d%s\n" % (count, cmd)
Something went wrong with that request. Please try again.