qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH] monitor: Add completion for help command


From: Jan Kiszka
Subject: [Qemu-devel] [PATCH] monitor: Add completion for help command
Date: Thu, 25 Jun 2009 08:22:02 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

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

 monitor.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/monitor.c b/monitor.c
index 6b45f6c..e0faf1c 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:

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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