qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [COMMIT f3353c6] monitor: Add completion for help command


From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT f3353c6] monitor: Add completion for help command
Date: Tue, 30 Jun 2009 00:57:42 -0000

From: Jan Kiszka <address@hidden>

Signed-off-by: Jan Kiszka <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>

diff --git a/monitor.c b/monitor.c
index 7fdd3a0..0878c36 100644
--- a/monitor.c
+++ b/monitor.c
@@ -2921,6 +2921,11 @@ static void monitor_find_completion(const char *cmdline)
                 for(key = key_defs; key->name != NULL; key++) {
                     cmd_completion(str, key->name);
                 }
+            } else if (!strcmp(cmd->name, "help|?")) {
+                readline_set_completion_index(cur_mon->rs, strlen(str));
+                for (cmd = mon_cmds; cmd->name != NULL; cmd++) {
+                    cmd_completion(str, cmd->name);
+                }
             }
             break;
         default:




reply via email to

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