]> Git Repo - qemu.git/commitdiff
Multi-key completion for sendkey
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 8 Mar 2009 17:42:02 +0000 (17:42 +0000)
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 8 Mar 2009 17:42:02 +0000 (17:42 +0000)
Allow completion of concatenated key strings for the sendkey command.

Signed-off-by: Jan Kiszka <[email protected]>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6784 c046a42c-6fe2-441c-8c8c-71466251a162

monitor.c

index 32dc4d5690b1dae7fb171de1d654d2d6d89a710d..44791c2716de4c642569672a987bfc646dd4aa5a 100644 (file)
--- 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);
This page took 0.02364 seconds and 4 git commands to generate.