[libvirt] [PATCHv3 2/6] virsh: Add vshCmdCompleter and vshOptCompleter

Eric Blake eblake at redhat.com
Tue Sep 3 15:24:35 UTC 2013


On 09/01/2013 01:22 PM, Tomas Meszaros wrote:
>> No, it should work like this:
>>
>> virsh# vol-key <TAB>
>> vol1 vol2 --vol --pool
>>

>>
>> virsh# vol-key --pool <TAB>
>> pool1 pool2

Another twist to remember - options can be spelled with '=' in one
argument, instead of two arguments.  This means you have a choice in
display between:

virsh# vol-key --pool=<TAB>
--pool=pool1 --pool=pool2

or

virsh# vol-key --pool=<TAB>
pool1 pool2

when there is an ambiguity, but the resolution of the tab completion
must be the full option=value (that is, don't lose the --pool= prefix by
expanding to just the value).

> 
> Yeah, It makes more sense.
> I'm now rewriting the whole stuff to just use opt completers.

Looking forward to another round of review - this is interesting code
from the UI point of view.  And I am still working on the './configure
--disable-readline' patch from my side.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130903/f9c18e0b/attachment-0001.sig>


More information about the libvir-list mailing list