]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh: Apply empty completer to arguments where completion doesn't make sense
authorPeter Krempa <pkrempa@redhat.com>
Tue, 20 May 2025 12:56:03 +0000 (14:56 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 21 May 2025 13:49:36 +0000 (15:49 +0200)
Few outstanding arguments were not marked with 'virshCompleteEmpty'
completer despite the fact that we can't provide any reasonable
suggestion, e.g. for the new description of a domain or for the launch
secret.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tools/virsh-domain.c
tools/virsh-network.c

index 7e5e83126e468d20209332a29e4c17212409c25e..f9acedf3dbb40508b321140bdfc641ffdba1a8a4 100644 (file)
@@ -8696,6 +8696,7 @@ static const vshCmdOptDef opts_desc[] = {
     {.name = "new-desc",
      .type = VSH_OT_ARGV,
      .positional = true,
+     .completer = vshCompleteEmpty,
      .help = N_("message")
     },
     {.name = NULL}
@@ -9936,10 +9937,12 @@ static const vshCmdOptDef opts_domsetlaunchsecstate[] = {
     VIRSH_COMMON_OPT_DOMAIN_FULL(0),
     {.name = "secrethdr",
      .type = VSH_OT_STRING,
+     .completer = vshCompleteEmpty,
      .help = N_("path to file containing the secret header"),
     },
     {.name = "secret",
      .type = VSH_OT_STRING,
+     .completer = vshCompleteEmpty,
      .help = N_("path to file containing the secret"),
     },
     {.name = "set-address",
@@ -10119,6 +10122,7 @@ static const vshCmdOptDef opts_qemu_monitor_command[] = {
      .type = VSH_OT_ARGV,
      .positional = true,
      .required = true,
+     .completer = vshCompleteEmpty,
      .help = N_("command")
     },
     {.name = NULL}
@@ -10503,6 +10507,7 @@ static const vshCmdOptDef opts_qemu_agent_command[] = {
      .type = VSH_OT_ARGV,
      .positional = true,
      .required = true,
+     .completer = vshCompleteEmpty,
      .help = N_("command")
     },
     {.name = NULL}
@@ -10590,6 +10595,7 @@ static const vshCmdOptDef opts_lxc_enter_namespace[] = {
      .type = VSH_OT_ARGV,
      .positional = true,
      .required = true,
+     .completer = vshCompleteEmpty,
      .help = N_("command to run")
     },
     {.name = NULL}
index 3fd22db2b07d39894d669f4d652a4697b18e244f..2e9613e01b4cc615fa8826e5104e9223e26927fa 100644 (file)
@@ -325,6 +325,7 @@ static const vshCmdOptDef opts_network_desc[] = {
     {.name = "new-desc",
      .type = VSH_OT_ARGV,
      .positional = true,
+     .completer = vshCompleteEmpty,
      .help = N_("message")
     },
     {.name = NULL}