virsh-snapshot: Use 'virshSnapshotNameCompleter' for '--from' of 'snapshot-list'

When listing a snapshot tree, the '--from' option takes a name of a
snapshot to limit the subset. Use virshSnapshotNameCompleter as
completer for the option.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Peter Krempa 2021-09-16 14:31:13 +02:00
parent 8f5b8fac33
commit 573385dc9c

View File

@ -1411,6 +1411,7 @@ static const vshCmdOptDef opts_snapshot_list[] = {
},
{.name = "from",
.type = VSH_OT_STRING,
.completer = virshSnapshotNameCompleter,
.help = N_("limit list to children of given snapshot")
},
VIRSH_COMMON_OPT_CURRENT(N_("limit list to children of current snapshot")),