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>
pull/11659/head
Jim Mussared 2023-05-30 13:25:29 +10:00 zatwierdzone przez Damien George
rodzic 7c2c9ea21c
commit d736a2f3f3
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

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