aboutsummaryrefslogtreecommitdiffstats
path: root/src/_virtualbox
diff options
context:
space:
mode:
authorShohei YOSHIDA <syohex@gmail.com>2022-12-24 09:27:04 +0900
committerShohei YOSHIDA <syohex@gmail.com>2022-12-24 09:27:04 +0900
commit4f8614d0ac32b27cbc32eabdf2fe849d4e3790a0 (patch)
tree146b872f810e89e00b80760167362b479fb59938 /src/_virtualbox
parentMerge pull request #967 from zsh-users/add-cloud (diff)
downloadzsh-completions-4f8614d0ac32b27cbc32eabdf2fe849d4e3790a0.tar
zsh-completions-4f8614d0ac32b27cbc32eabdf2fe849d4e3790a0.tar.gz
zsh-completions-4f8614d0ac32b27cbc32eabdf2fe849d4e3790a0.tar.bz2
zsh-completions-4f8614d0ac32b27cbc32eabdf2fe849d4e3790a0.tar.lz
zsh-completions-4f8614d0ac32b27cbc32eabdf2fe849d4e3790a0.tar.xz
zsh-completions-4f8614d0ac32b27cbc32eabdf2fe849d4e3790a0.tar.zst
zsh-completions-4f8614d0ac32b27cbc32eabdf2fe849d4e3790a0.zip
Add guestproperty subcommand completion
Diffstat (limited to 'src/_virtualbox')
-rw-r--r--src/_virtualbox48
1 files changed, 46 insertions, 2 deletions
diff --git a/src/_virtualbox b/src/_virtualbox
index 33510cb..2313bab 100644
--- a/src/_virtualbox
+++ b/src/_virtualbox
@@ -297,7 +297,7 @@ _vboxmanage() {
# TODO
;;
(guestproperty)
- # TODO
+ _vboxmanage_guestproperty
;;
(guestcontrol)
# TODO
@@ -752,7 +752,6 @@ _vboxmanage_snapshot() {
case $state in
(arg)
- local subcommand=$words[2]
compset -n 2
case $words[1] in
(take)
@@ -882,6 +881,51 @@ _vboxmanage_mediumio_stream() {
'--output=[The output filename]: :_files'
}
+(( $+functions[_vboxmanage_guestproperty] )) ||
+_vboxmanage_guestproperty() {
+ local ret=1
+
+ _arguments -C \
+ '1: :(get enumerate set unset wait)' \
+ '*:: :->arg' \
+ && ret=0
+
+ case $state in
+ (arg)
+ case $words[1] in
+ (enumerate)
+ _arguments \
+ '--relative[Display the timestamp relative to current time]' \
+ '--no-timestamp[Do not display the timestamp of the last update]' \
+ '--no-flags[Do not display the flags]' \
+ '--old-format[Use the output format from VirtualBox 6]' \
+ '1: :_vboxmachines' \
+ && ret=0
+ ;;
+ (get)
+ _arguments \
+ '--verbose[Provides the property value, timestamp, and any specified value attributes]' \
+ '1: :_vboxmachines' \
+ && ret=0
+ ;;
+ (set)
+ _arguments \
+ '--flags=[Specify the additional attributes of the value]: :(TRANSIENT TRANSRESET RDONLYGUEST RDONLYHOST READONLY)' \
+ '1: :_vboxmachines' \
+ && ret=0
+ ;;
+ (wait)
+ _arguments \
+ '1: :_vboxmachines' \
+ && ret=0
+ ;;
+ esac
+ ;;
+ esac
+
+ return $ret
+}
+
(( $+functions[_vboxheadless] )) ||
_vboxheadless() {
local ret=1