]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh: Provide local path completer for screenshot --file
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 17 Sep 2021 07:50:09 +0000 (09:50 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 21 Sep 2021 08:20:41 +0000 (10:20 +0200)
The screenshot command takes optional --file argument which can
point to an existing local path (in which case the file is
overwritten). Set the argument's completer so that self-test
doesn't report it as missing.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tools/virsh-domain.c

index 70aa4167c2fa23bf127d428ba8af2f37f852177e..f876f30cc5cf374ff16df6dc080289e05fba059f 100644 (file)
@@ -5520,6 +5520,7 @@ static const vshCmdOptDef opts_screenshot[] = {
     VIRSH_COMMON_OPT_DOMAIN_FULL(VIR_CONNECT_LIST_DOMAINS_ACTIVE),
     {.name = "file",
      .type = VSH_OT_STRING,
+     .completer = virshCompletePathLocalExisting,
      .help = N_("where to store the screenshot")
     },
     {.name = "screen",