libvirt/tools/bash-completion/meson.build
Andrea Bolognani cf66ee8ddc tools: Generate per-command bash completion script
The current setup uses a single script that is symlinked twice
and that tries to configure bash completion for both virsh and
virt-admin, even if only one of them is installed. This also
forces us to have a -bash-completion RPM package that only
contains the tiny shared file.

Rework bash completion support so that two scripts are
generated, each one tailored to a specific command.

Since the shared script no longer exists after this change,
the corresponding RPM package becomes empty.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-04-22 11:01:27 +02:00

16 lines
360 B
Meson

completion_commands = [
'virsh',
'virt-admin',
]
foreach command : completion_commands
completion_conf = configuration_data()
completion_conf.set('command', command)
completion = configure_file(
input: 'vsh.in',
output: command,
configuration: completion_conf,
)
install_data(completion, install_dir: bash_completion_dir)
endforeach