diff --git a/tools/virsh-backup.c b/tools/virsh-backup.c index 9125b7da97..7bac1923a6 100644 --- a/tools/virsh-backup.c +++ b/tools/virsh-backup.c @@ -39,10 +39,12 @@ static const vshCmdOptDef opts_backup_begin[] = { VIRSH_COMMON_OPT_DOMAIN_FULL(VIR_CONNECT_LIST_DOMAINS_ACTIVE), {.name = "backupxml", .type = VSH_OT_STRING, + .completer = virshCompletePathLocalExisting, .help = N_("domain backup XML"), }, {.name = "checkpointxml", .type = VSH_OT_STRING, + .completer = virshCompletePathLocalExisting, .help = N_("domain checkpoint XML"), }, {.name = "reuse-external", diff --git a/tools/virsh-checkpoint.c b/tools/virsh-checkpoint.c index 1f3a318014..78272b43c4 100644 --- a/tools/virsh-checkpoint.c +++ b/tools/virsh-checkpoint.c @@ -88,6 +88,7 @@ static const vshCmdOptDef opts_checkpoint_create[] = { VIRSH_COMMON_OPT_DOMAIN_FULL(VIR_CONNECT_LIST_DOMAINS_ACTIVE), {.name = "xmlfile", .type = VSH_OT_STRING, + .completer = virshCompletePathLocalExisting, .help = N_("domain checkpoint XML") }, {.name = "redefine", diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index ac57595e76..d23a309498 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -2243,6 +2243,7 @@ static const vshCmdOptDef opts_blockcopy[] = { }, {.name = "xml", .type = VSH_OT_STRING, + .completer = virshCompletePathLocalExisting, .help = N_("filename containing XML description of the copy destination") }, {.name = "format", @@ -4140,6 +4141,7 @@ static const vshCmdOptDef opts_save[] = { }, {.name = "xml", .type = VSH_OT_STRING, + .completer = virshCompletePathLocalExisting, .help = N_("filename containing updated XML for the target") }, {.name = "running", @@ -4534,6 +4536,7 @@ static const vshCmdOptDef opts_save_image_define[] = { {.name = "xml", .type = VSH_OT_DATA, .flags = VSH_OFLAG_REQ, + .completer = virshCompletePathLocalExisting, .help = N_("filename containing updated XML for the target") }, {.name = "running", @@ -4947,6 +4950,7 @@ static const vshCmdOptDef opts_managed_save_define[] = { {.name = "xml", .type = VSH_OT_DATA, .flags = VSH_OFLAG_REQ, + .completer = virshCompletePathLocalExisting, .help = N_("filename containing updated XML for the target") }, {.name = "running", @@ -5249,6 +5253,7 @@ static const vshCmdOptDef opts_restore[] = { }, {.name = "xml", .type = VSH_OT_STRING, + .completer = virshCompletePathLocalExisting, .help = N_("filename containing updated XML for the target") }, {.name = "running", @@ -10008,6 +10013,7 @@ static const vshCmdOptDef opts_domxmlfromnative[] = { {.name = "config", .type = VSH_OT_DATA, .flags = VSH_OFLAG_REQ, + .completer = virshCompletePathLocalExisting, .help = N_("config data file to import from") }, {.name = NULL} @@ -10063,6 +10069,7 @@ static const vshCmdOptDef opts_domxmltonative[] = { VIRSH_COMMON_OPT_DOMAIN_OT_STRING_FULL(VSH_OFLAG_REQ_OPT, 0), {.name = "xml", .type = VSH_OT_STRING, + .completer = virshCompletePathLocalExisting, .help = N_("xml data file to export from") }, {.name = NULL} @@ -10393,6 +10400,7 @@ static const vshCmdOptDef opts_migrate[] = { }, {.name = "xml", .type = VSH_OT_STRING, + .completer = virshCompletePathLocalExisting, .help = N_("filename containing updated XML for the target") }, {.name = "migrate-disks", @@ -10439,6 +10447,7 @@ static const vshCmdOptDef opts_migrate[] = { }, {.name = "persistent-xml", .type = VSH_OT_STRING, + .completer = virshCompletePathLocalExisting, .help = N_("filename containing updated persistent XML for the target") }, {.name = "tls", @@ -13974,6 +13983,7 @@ static const vshCmdOptDef opts_set_user_sshkeys[] = { }, {.name = "file", .type = VSH_OT_STRING, + .completer = virshCompletePathLocalExisting, .help = N_("optional file to read keys from"), }, {.name = "reset", diff --git a/tools/virsh-network.c b/tools/virsh-network.c index 37c19b663b..8651265909 100644 --- a/tools/virsh-network.c +++ b/tools/virsh-network.c @@ -948,6 +948,7 @@ static const vshCmdOptDef opts_network_update[] = { {.name = "xml", .type = VSH_OT_DATA, .flags = VSH_OFLAG_REQ, + .completer = virshCompletePathLocalExisting, .help = N_("name of file containing xml (or, if it starts with '<', the complete " "xml element itself) to add/modify, or to be matched for search") }, diff --git a/tools/virsh-pool.c b/tools/virsh-pool.c index cbbbe5c4b9..9ad7cbe466 100644 --- a/tools/virsh-pool.c +++ b/tools/virsh-pool.c @@ -1501,6 +1501,7 @@ static const vshCmdOptDef opts_find_storage_pool_sources[] = { }, {.name = "srcSpec", .type = VSH_OT_STRING, + .completer = virshCompletePathLocalExisting, .help = N_("optional file of source xml to query for pools") }, {.name = NULL} diff --git a/tools/virsh-secret.c b/tools/virsh-secret.c index 173a77fd90..d23cbf04bf 100644 --- a/tools/virsh-secret.c +++ b/tools/virsh-secret.c @@ -186,6 +186,7 @@ static const vshCmdOptDef opts_secret_set_value[] = { {.name = "file", .type = VSH_OT_STRING, .flags = VSH_OFLAG_REQ_OPT, + .completer = virshCompletePathLocalExisting, .help = N_("read secret from file"), }, {.name = "plain", diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c index 60a68b334b..5a3c468c53 100644 --- a/tools/virsh-snapshot.c +++ b/tools/virsh-snapshot.c @@ -115,6 +115,7 @@ static const vshCmdOptDef opts_snapshot_create[] = { VIRSH_COMMON_OPT_DOMAIN_FULL(0), {.name = "xmlfile", .type = VSH_OT_STRING, + .completer = virshCompletePathLocalExisting, .help = N_("domain snapshot XML") }, {.name = "redefine",