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