On a Thursday in 2021, Peter Krempa wrote:
For now this serves just as an annotation because readline and also
the
bash completion script insist on completing local paths when an empty
list is returned.
This will serve for future reference once we'll be able to properly
refuse to suggest anything.
The completer is used for fields such as names for new objects,
description strings, password strings etc, URIs and hostnames which we
can't feasibly autocomplete.
My bash autocompletes hostnames from ssh's known_hosts. But I agree
that it might not be feasible.
Passwods, on the other hand, are trivially completable:
https://listman.redhat.com/archives/libvir-list/2019-April/msg00018.html
Jano
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
tools/virsh-checkpoint.c | 2 ++
tools/virsh-completer.c | 18 ++++++++++++++++++
tools/virsh-completer.h | 5 +++++
tools/virsh-domain.c | 33 +++++++++++++++++++++++++++++++++
tools/virsh-pool.c | 7 +++++++
tools/virsh-secret.c | 1 +
tools/virsh-snapshot.c | 2 ++
tools/virsh-volume.c | 5 +++++
tools/virsh.c | 1 +
9 files changed, 74 insertions(+)