tools/mpremote: Allow terminator for shortcut commands.
For example, the `reset` shortcut previously allowed an optional delay, but the argument handling cannot handle `reset next-command` as `next-command` will be interpreted as the delay argument. The fix in this commit allows `reset + next-command`. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
parent
7c2c9ea21c
commit
d736a2f3f3
|
@ -406,6 +406,8 @@ def do_command_expansion(args):
|
|||
cmd = args.pop(0)
|
||||
exp_args, exp_sub, _ = _command_expansions[cmd]
|
||||
for exp_arg in exp_args:
|
||||
if args and args[0] == "+":
|
||||
break
|
||||
exp_arg_name = exp_arg[0]
|
||||
if args and "=" not in args[0]:
|
||||
# Argument given without a name.
|
||||
|
|
Loading…
Reference in New Issue