On a Thursday in 2021, Kristina Hanicova wrote:
Signed-off-by: Kristina Hanicova <khanicov(a)redhat.com>
---
tools/virsh-completer-domain.c | 72 ++++++++++++++++++++++++++++++++++
tools/virsh-completer-domain.h | 8 +++-
tools/virsh-domain.c | 1 +
3 files changed, 79 insertions(+), 2 deletions(-)
diff --git a/tools/virsh-completer-domain.h b/tools/virsh-completer-domain.h
index 4c01b0ca1f..04a3705ff9 100644
--- a/tools/virsh-completer-domain.h
+++ b/tools/virsh-completer-domain.h
@@ -112,5 +112,9 @@ char ** virshDomainLifecycleActionCompleter(vshControl *ctl,
unsigned int flags);
char ** virshCodesetNameCompleter(vshControl *ctl,
- const vshCmd *cmd,
- unsigned int flags);
+ const vshCmd *cmd,
+ unsigned int flags);
+
This indentation change is not related to the rest of the commit,
so I split it out into a separate commit before pushing.
+char ** virshKeycodeNameCompleter(vshControl *ctl,
+ const vshCmd *cmd,
+ unsigned int flags);
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index d40995f44d..df33467646 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -8802,6 +8802,7 @@ static const vshCmdOptDef opts_send_key[] = {
{.name = "keycode",
.type = VSH_OT_ARGV,
.flags = VSH_OFLAG_REQ,
+ .completer = virshKeycodeNameCompleter,
.help = N_("the key code")
},
{.name = NULL}
--
2.29.2
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
Jano