qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH] monitor: Multi-key completion for sendkey


From: Jan Kiszka
Subject: [Qemu-devel] [PATCH] monitor: Multi-key completion for sendkey
Date: Sun, 08 Mar 2009 16:27:10 +0100
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

Allow completion of concatenated key strings for the sendkey command.

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

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

diff --git a/monitor.c b/monitor.c
index 32dc4d5..44791c2 100644
--- a/monitor.c
+++ b/monitor.c
@@ -2957,6 +2957,9 @@ static void monitor_find_completion(const char *cmdline)
                     cmd_completion(str, cmd->name);
                 }
             } else if (!strcmp(cmd->name, "sendkey")) {
+                char *sep = strrchr(str, '-');
+                if (sep)
+                    str = sep + 1;
                 readline_set_completion_index(cur_mon->rs, strlen(str));
                 for(key = key_defs; key->name != NULL; key++) {
                     cmd_completion(str, key->name);




reply via email to

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