Commit e600d1ef2de3da68570fd630be7d8e253dced399

Authored by blueswir1
1 parent 49dc768d

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
Showing 1 changed file with 3 additions and 0 deletions
monitor.c
... ... @@ -2957,6 +2957,9 @@ static void monitor_find_completion(const char *cmdline)
2957 2957 cmd_completion(str, cmd->name);
2958 2958 }
2959 2959 } else if (!strcmp(cmd->name, "sendkey")) {
  2960 + char *sep = strrchr(str, '-');
  2961 + if (sep)
  2962 + str = sep + 1;
2960 2963 readline_set_completion_index(cur_mon->rs, strlen(str));
2961 2964 for(key = key_defs; key->name != NULL; key++) {
2962 2965 cmd_completion(str, key->name);
... ...