From: Jan Kiszka <jan.kiszka@web.de>
To: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] monitor: Multi-key completion for sendkey
Date: Sun, 08 Mar 2009 16:27:10 +0100 [thread overview]
Message-ID: <49B3E3CE.4060107@web.de> (raw)
Allow completion of concatenated key strings for the sendkey command.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
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);
next reply other threads:[~2009-03-08 15:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-08 15:27 Jan Kiszka [this message]
2009-03-08 17:43 ` [Qemu-devel] [PATCH] monitor: Multi-key completion for sendkey Blue Swirl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49B3E3CE.4060107@web.de \
--to=jan.kiszka@web.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.