aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);