monitor: Multi-key completion for sendkey
PATCH 1/1 monitor: Multi-key completion for sendkey
Allow completion of concatenated key strings for the sendkey command.
Signed-off-by Jan Kiszka <[email protected]>
---
monitor.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
monitor.c +3 -0
@@ -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);
Quoted 3 lines · Jan Kiszka
Allow completion of concatenated key strings for the sendkey command.
Signed-off-by Jan Kiszka <[email protected]>
I've always wanted this feature, thanks! Applied as r6784.