[PATCH 13/14] virsh: Introduce virshCompleteEmpty and use it for places where we can't suggest anything

Ján Tomko jtomko at redhat.com
Mon Sep 20 13:42:15 UTC 2021


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 at 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(+)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20210920/72f07340/attachment-0001.sig>


More information about the libvir-list mailing list