diff options
| author | Shohei YOSHIDA <syohex@gmail.com> | 2022-12-24 17:31:27 +0900 |
|---|---|---|
| committer | Shohei YOSHIDA <syohex@gmail.com> | 2022-12-24 17:31:27 +0900 |
| commit | 01c0875bb560f3969b92b18e1a09556c73319128 (patch) | |
| tree | 4896bb2bf65c6f85ff4a588b8a966d3138d1e925 /src/_virtualbox | |
| parent | Merge pull request #969 from zsh-users/add-usbfilter (diff) | |
| download | zsh-completions-01c0875bb560f3969b92b18e1a09556c73319128.tar zsh-completions-01c0875bb560f3969b92b18e1a09556c73319128.tar.gz zsh-completions-01c0875bb560f3969b92b18e1a09556c73319128.tar.bz2 zsh-completions-01c0875bb560f3969b92b18e1a09556c73319128.tar.lz zsh-completions-01c0875bb560f3969b92b18e1a09556c73319128.tar.xz zsh-completions-01c0875bb560f3969b92b18e1a09556c73319128.tar.zst zsh-completions-01c0875bb560f3969b92b18e1a09556c73319128.zip | |
Add updatecheck subcommand completion
Diffstat (limited to 'src/_virtualbox')
| -rw-r--r-- | src/_virtualbox | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/src/_virtualbox b/src/_virtualbox index 79888f3..c6cbf29 100644 --- a/src/_virtualbox +++ b/src/_virtualbox @@ -327,7 +327,7 @@ _vboxmanage() { # TODO ;; (updatecheck) - # TODO + _vboxmanage_updatecheck ;; (modifynvram) # TODO @@ -966,6 +966,43 @@ _vboxmanage_guestproperty() { return $ret } + +(( $+functions[_vboxmanage_updatecheck] )) || +_vboxmanage_updatecheck() { + local ret=1 + + _arguments -C \ + '1: :(perform list modify)' \ + '*:: :->arg' \ + && ret=0 + + case $state in + (arg) + case $words[1] in + (perform|list) + _arguments \ + '--machine-readable[Machine readable output]' \ + && ret=0 + ;; + (modify) + _arguments \ + '--verbose[Provides the property value, timestamp, and any specified value attributes]' \ + '(--enable --disable)--enable[Enable the update check service]' \ + '(--enable --disable)--disable[Disable the update check service]' \ + '--channel=[The preferred release type]: :(stable withbetas all)' \ + '--frequency=[Specifies how often in days to check for a newer version of VirtualBox]:days' \ + '--proxy-mode=[Specifies the proxy mode to use]: :(system manual none)' \ + '--proxy-url=[Specifies the proxy address to use]:proxy' \ + '1: :_vboxmachines' \ + && ret=0 + ;; + esac + ;; + esac + + return $ret +} + (( $+functions[_vboxheadless] )) || _vboxheadless() { local ret=1 |
