On 5/20/25 16:08, Peter Krempa via Devel wrote:
> Make the core completer code common in all virt shells and annotate few
> arguments with the existing empty and local-file completers.
>
> Peter Krempa (4):
> virsh: completer: Extract common completer methods from virsh to vsh
> vsh: Apply empty/local completers to global commands
> virsh: Apply empty completer to arguments where completion doesn't
> make sense
> virsh: domain: Annotate rest of arguments taking local existing file
>
> tools/meson.build | 2 +-
> tools/virsh-backup.c | 6 +-
> tools/virsh-checkpoint.c | 8 +-
> tools/virsh-completer-domain.c | 70 ++++++------
> tools/virsh-completer-host.c | 12 +-
> tools/virsh-completer-nodedev.c | 10 +-
> tools/virsh-completer-pool.c | 6 +-
> tools/virsh-completer-volume.c | 4 +-
> tools/virsh-completer.h | 19 +---
> tools/virsh-domain.c | 112 ++++++++++---------
> tools/virsh-host.c | 6 +-
> tools/virsh-interface.c | 2 +-
> tools/virsh-network.c | 9 +-
> tools/virsh-nodedev.c | 2 +-
> tools/virsh-nwfilter.c | 4 +-
> tools/virsh-pool.c | 18 +--
> tools/virsh-secret.c | 6 +-
> tools/virsh-snapshot.c | 8 +-
> tools/virsh-volume.c | 12 +-
> tools/virsh.c | 2 +-
> tools/virsh.h | 2 +-
> tools/{virsh-completer.c => vsh-completer.c} | 34 +++---
> tools/vsh-completer.h | 41 +++++++
> tools/vsh.c | 6 +
> 24 files changed, 222 insertions(+), 179 deletions(-)
> rename tools/{virsh-completer.c => vsh-completer.c} (85%)
> create mode 100644 tools/vsh-completer.h
>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Michal