virsh: Provide local path completer for screenshot --file

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>
This commit is contained in:
Michal Privoznik 2021-09-17 09:50:09 +02:00
parent bdac3a142c
commit 8eefc7afc8

View 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",