[PATCH 1/4] virsh: Provide local path completer for screenshot --file

Michal Privoznik mprivozn at redhat.com
Fri Sep 17 08:13:07 UTC 2021


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 at redhat.com>
---
 tools/virsh-domain.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 70aa4167c2..f876f30cc5 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -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",
-- 
2.32.0




More information about the libvir-list mailing list