Patchwork [v4,10/23] monitor: Fix command completion vs. boolean switches

login
register
mail settings
Submitter Jan Kiszka
Date June 15, 2010, 10:38 p.m.
Message ID <9518eafba99d70356f4a84aa2e5b91a18cb99e90.1276641524.git.jan.kiszka@web.de>
Download mbox | patch
Permalink /patch/55827/
State New
Headers show

Comments

Jan Kiszka - June 15, 2010, 10:38 p.m.
From: Jan Kiszka <jan.kiszka@siemens.com>

We now have to move forward to the next argument type via next_arg_type.
This patch fixes completion for 'eject' and maybe also other commands.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 monitor.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/monitor.c b/monitor.c
index 242aee6..c1006b4 100644
--- a/monitor.c
+++ b/monitor.c
@@ -3913,7 +3913,7 @@  static void monitor_find_completion(const char *cmdline)
         }
         str = args[nb_args - 1];
         if (*ptype == '-' && ptype[1] != '\0') {
-            ptype += 2;
+            ptype = next_arg_type(ptype);
         }
         switch(*ptype) {
         case 'F':