diff mbox

[v2,5/5] monitor: Fix HMP tab completion

Message ID 1415808678-30795-6-git-send-email-kwolf@redhat.com
State New
Headers show

Commit Message

Kevin Wolf Nov. 12, 2014, 4:11 p.m. UTC
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 <kwolf@redhat.com>
---
 monitor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/monitor.c b/monitor.c
index 3e7c640..e3219e0 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4698,7 +4698,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) {