Re: [PATCH 08/11] tools: Provide bash autompletion file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/10/2017 05:01 AM, Michal Privoznik wrote:

> 
> So while implementing this I realized it will not fly. At ARGV level it
> is impossible to tell apart "--domain" and "--domain ".

But it is not impossible to tell apart '"--domain"' (one arg) and
'"--domain" ""' (two args).  If you have trailing whitespace, then tack
on an empty argument.

> But the
> difference is important, because in the first case we want to offer list
> of all --options, while in the second case we want to call the --domain
> completer. 

Yes, the difference between one argument and two is significant - the
completion should always be done on the last argument, but the last
argument needs to be the empty string if it is not in the middle of a word.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux