Merge pull request #966 from zsh-users/add-snapshot
Add snapshot subcommand completion
This commit is contained in:
commit
6fe5f8a46a
|
@ -165,7 +165,7 @@ _vboxmanage() {
|
|||
&& ret=0
|
||||
;;
|
||||
(snapshot)
|
||||
# TODO
|
||||
_vboxmanage_snapshot
|
||||
;;
|
||||
(closemedium)
|
||||
_arguments \
|
||||
|
@ -544,6 +544,48 @@ _vboxmanage_unattended() {
|
|||
return $ret
|
||||
}
|
||||
|
||||
(( $+functions[_vboxmanage_snapshot] )) ||
|
||||
_vboxmanage_snapshot() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'1: :_vboxmachines' \
|
||||
'2: :(take delete restore restorecurrent edit list showvminfo)' \
|
||||
'*:: :->arg' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(arg)
|
||||
local subcommand=$words[2]
|
||||
compset -n 2
|
||||
case $words[1] in
|
||||
(take)
|
||||
_arguments \
|
||||
'--description=[Specifies a description of the snapshot]:description' \
|
||||
'--live[Specifies that the VM is not stopped while you create the snapshot]' \
|
||||
'--uniquename=[unique name]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(edit)
|
||||
_arguments \
|
||||
'--current[Specifies that you update the current version of the snapshot]' \
|
||||
'--description=[Specifies a new description for the snapshot]:description' \
|
||||
'--name=[Specifies a new name for the snapshot]:name' \
|
||||
&& ret=0
|
||||
;;
|
||||
(list)
|
||||
_arguments \
|
||||
'--details[Specifies that the output shows detailed information about the snapshot]' \
|
||||
'--machinereadable[Specifies that the output is shown in a machine-readable format]' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
(( $+functions[_vboxmanage_bandwidthctl] )) ||
|
||||
_vboxmanage_bandwidthctl() {
|
||||
local ret=1
|
||||
|
|
Loading…
Reference in New Issue