From e600d1ef2de3da68570fd630be7d8e253dced399 Mon Sep 17 00:00:00 2001 From: blueswir1 Date: Sun, 8 Mar 2009 17:42:02 +0000 Subject: [PATCH] Multi-key completion for sendkey Allow completion of concatenated key strings for the sendkey command. Signed-off-by: Jan Kiszka git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6784 c046a42c-6fe2-441c-8c8c-71466251a162 --- monitor.c | 3 +++ 1 file changed, 3 insertions(+) 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);