* [PATCH] Update libvirt completions
@ 2017-05-10 7:58 Marko Myllynen
0 siblings, 0 replies; only message in thread
From: Marko Myllynen @ 2017-05-10 7:58 UTC (permalink / raw)
To: zsh workers
Hi,
Minor update for libvirt completions.
Add new hypervisor type and allow using the fairly common virsh edit
command without --domain. Thanks to the automated nature of the actual
completions, other recent additions in tools like virsh and virt-admin
are available with no code changes.
---
Completion/Unix/Command/_libvirt | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Completion/Unix/Command/_libvirt b/Completion/Unix/Command/_libvirt
index 1aa8ed8..a3ab5a6 100644
--- a/Completion/Unix/Command/_libvirt
+++ b/Completion/Unix/Command/_libvirt
@@ -20,6 +20,7 @@ typeset -A dom_opts
dom_opts=(
console " "
destroy " "
+ edit " "
managedsave " "
reboot " "
reset " "
@@ -95,7 +96,7 @@ case $service in
'(- *)'{-h,--help}'[print help information and exit]' \
'(- *)'{-v,--version}'[print version information and exit]' \
'(- *)'{-q,--quiet}'[quiet mode]' \
- '1:hv-type:(qemu lxc)' && return
+ '1:hv-type:(qemu lxc bhyve)' && return
;;
virt-pki-validate)
_arguments -A "-*" -S \
@@ -197,7 +198,7 @@ case $state in
return 1
fi
# Allow passing domain without --domain with few of the most used commands
- if [[ $cmd == (destroy|reboot|reset|start|shutdown) ]]; then
+ if [[ $cmd == (destroy|edit|reboot|reset|start|shutdown) ]]; then
if [[ $words[CURRENT-1] == $cmd ]]; then
values=( $(_call_program domains "noglob virsh $conn_opt list ${dom_opts[$cmd]:-"--all"} --name") )
[[ -n $values ]] && _wanted domains expl domain compadd ${=values} && return 0
Thanks,
--
Marko Myllynen
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-05-10 7:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-10 7:58 [PATCH] Update libvirt completions Marko Myllynen
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).