Re: libvirt zsh completions

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

 



On Wed, Oct 05, 2016 at 12:29:59PM +0300, 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
 + networks
 + devices
 + nwfilters
 + pools
 + secrets
 + snapshots
 + volumes

Supported commands are:

virsh virt-admin virt-host-validate virt-pki-validate virt-xml-validate

Since virt-admin requires root/sudo, there are some additional security
checks in zsh upstream to enable sudo for completions only by request.
This will require the next zsh release. I've uploaded a version of these
completions which uses sudo unconditionally to my fedorapeople.org page
and it can be used by the adventurous already today (by placing it under
/usr/share/zsh/*/functions/):

https://myllynen.fedorapeople.org/_libvirt


That is great!  Just for some individuals using zsh on gentoo, put it
into /usr/share/zsh/site_functions/, that worked for me, 5.2/functions
didn't work for me.

Thanks!

Cheers,

--
Marko Myllynen

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

Attachment: signature.asc
Description: 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]