On Mon, Jul 13, 2026 at 12:14:46 +0200, Radosław Śmigielski via Devel wrote:
> From: Radoslaw Smigielski <[email protected]>
> 
> These changes add missing virsh TAB completion callbacks for several commands.
> Fixed or added completers covers command grouped by similar options:
> 
> output paths:
>   - dump --file
>   - save --file
>   - blockcopy --dest
>   - screenshot --file (fixes pre-existing wrong annotation)
> 
> display / native format:
>   - domdisplay --type
>   - domxml-from-native --format
>   - domxml-to-native --format
> 
> storage volume formats:
>   - vol-create-as --format
>   - vol-create-as --backing-vol-format
> 
> attach-disk:
>   - targetbus, type, cache, io, mode, sourcetype, subdriver
>   - source-host-socket
> 
> In patch 1/5 added vshCompletePathLocalCreate, a new noop completer
> for local file paths used as command output where the target file may
> not exist yet. This is the counterpart to vshCompletePathLocalExisting,
> which is for existing files used as input.
> 
> In patch 2/5 adds a completer for domdisplay --type using
> virDomainGraphicsTypeToString and VIR_DOMAIN_GRAPHICS_TYPE_LAST
> so the options stays in sync with libvirt graphics types.
> Replaced the static list from first patch set.
> 
> In patch 3/5 adds virshDomainXMLNativeFormatCompleter for domxml-from-native
> --format (hypervisor-dependent native config format list).
> In virshDomainXMLNativeFormatCompleter() added 4 new "static const char[]"
> variables, follow the same pattern appears in the same file. Even though
> these variables could be a non-static local arrays.
> 
> In patch 4/5 reuses existing completers for domxml-to-native --format and
> vol-create-as --format / --backing-vol-format.
> 
> In 5/5 adds few enum and static-list completers for attach-disk options
> targetbus, type, cache, io, mode, and sourcetype, and reuses the storage
> file format completer for subdriver.
> In virshDomainAttachDiskSourceTypeCompleter, I added a static list of element
> types, I did not find any existing variable with the same list content.
> 
> Partially-fixes: https://gitlab.com/libvirt/libvirt/-/work_items/9

I've moved around few of the things in the patches and I'll push this
shortly.

Reviewed-by: Peter Krempa <[email protected]>

Reply via email to