[libvirt] libvirt zsh completions

Eric Blake eblake at redhat.com
Wed Oct 5 16:06:54 UTC 2016


On 10/05/2016 04:29 AM, Marko Myllynen wrote:
> Hi,
> 
> FWIW, FYI, I've contributed completions for the commands part of libvirt
> to zsh upstream, here's a quick screenshot:
> 
> $ virsh <TAB>
> zsh: do you wish to see all 222 possibilities (111 lines)? n
> $ virsh allocpages <TAB>
> --add        --all        --cellno     --pagecount  --pagesize
> $ virsh start <TAB>
> f23-test        fedora-24-beta  rhel-7-server
> $ virsh stop <TAB>
> f24-test        rhel-6-server   ubuntu-16.04
> $ 
> 
> There's also support for the -c/--connect flag and selective completion
> support for the following (domains seen as an example above):
> 
>   + domains
>   + interfaces

...

I'd STILL love to see the day when virsh itself offered a 'virsh
completion foo bar...' command that gave context-sensitive completion
results for 'virsh foo bar...'.  The idea has been on the list for
several years, and one student attempted (but failed) to do it for
Google Summer of Code.  With such a command in place, both bash and zsh
completion functions become a LOT simpler (simply let virsh provide the
list), and we aren't reinventing the wheel every time a new poster
provides yet another completion engine in their favorite shell.

-- 
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: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20161005/b9c51f51/attachment-0001.sig>


More information about the libvir-list mailing list