From: Kevin Wolf Date: Wed, 12 Nov 2014 15:24:02 +0000 (+0100) Subject: monitor: Fix HMP tab completion X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=48fe86f6400574165979e0db6f5937ad487b6888;p=qemu.git monitor: Fix HMP tab completion Commands with multiple boolean flag options (like 'info block') didn't provide correct completion because only the first one was skipped. Signed-off-by: Kevin Wolf --- diff --git a/monitor.c b/monitor.c index f63a3aae28..b37ddda457 100644 --- a/monitor.c +++ b/monitor.c @@ -4695,7 +4695,7 @@ static void monitor_find_completion_by_table(Monitor *mon, } } str = args[nb_args - 1]; - if (*ptype == '-' && ptype[1] != '\0') { + while (*ptype == '-' && ptype[1] != '\0') { ptype = next_arg_type(ptype); } switch(*ptype) {