aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2009-03-08 17:42:02 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2009-03-08 17:42:02 +0000
commite600d1ef2de3da68570fd630be7d8e253dced399 (patch)
treef1d3355cafac376ec42f989a69a85118107e3105
parent49dc768d4c579298d56777348422ebdca565a3ef (diff)
Multi-key completion for sendkey
Allow completion of concatenated key strings for the sendkey command. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6784 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--monitor.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/monitor.c b/monitor.c
index 32dc4d5690..44791c2716 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);