qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH V2 6/7] monitor: improve "help" in auto completion f


From: Wenchao Xia
Subject: [Qemu-devel] [PATCH V2 6/7] monitor: improve "help" in auto completion for sub command
Date: Mon, 24 Jun 2013 20:48:44 +0800

Now special case "help *" in auto completion can work with sub commands,
such as "help info a*".

Signed-off-by: Wenchao Xia <address@hidden>
---
 monitor.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/monitor.c b/monitor.c
index f364a0d..8b26b48 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4273,10 +4273,7 @@ static void monitor_find_completion_by_table(Monitor 
*mon,
                     cmd_completion(mon, str, QKeyCode_lookup[i]);
                 }
             } else if (!strcmp(cmd->name, "help|?")) {
-                readline_set_completion_index(mon->rs, strlen(str));
-                for (cmd = mon->cmd_table; cmd->name != NULL; cmd++) {
-                    cmd_completion(mon, str, cmd->name);
-                }
+                monitor_find_completion_by_table(mon, cmd_table, p);
             }
             break;
         default:
-- 
1.7.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]