diff options
| author | Shohei YOSHIDA <syohex@gmail.com> | 2022-12-24 15:50:32 +0900 |
|---|---|---|
| committer | Shohei YOSHIDA <syohex@gmail.com> | 2022-12-24 15:50:32 +0900 |
| commit | eff72eacf6da7b2169cf748fa099237167c77dff (patch) | |
| tree | 6a89acb6609c0b8be0eaeabe78ab0dd6709641d9 /src | |
| parent | Merge pull request #968 from zsh-users/add_guestproperty (diff) | |
| download | zsh-completions-eff72eacf6da7b2169cf748fa099237167c77dff.tar zsh-completions-eff72eacf6da7b2169cf748fa099237167c77dff.tar.gz zsh-completions-eff72eacf6da7b2169cf748fa099237167c77dff.tar.bz2 zsh-completions-eff72eacf6da7b2169cf748fa099237167c77dff.tar.lz zsh-completions-eff72eacf6da7b2169cf748fa099237167c77dff.tar.xz zsh-completions-eff72eacf6da7b2169cf748fa099237167c77dff.tar.zst zsh-completions-eff72eacf6da7b2169cf748fa099237167c77dff.zip | |
Add usbfilter subcommand completion
Diffstat (limited to 'src')
| -rw-r--r-- | src/_virtualbox | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/src/_virtualbox b/src/_virtualbox index 2313bab..79888f3 100644 --- a/src/_virtualbox +++ b/src/_virtualbox @@ -291,7 +291,7 @@ _vboxmanage() { && ret=0 ;; (usbfilter) - # TODO + _vboxmanage_usbfilter && ret=0 ;; (sharedfolder) # TODO @@ -881,6 +881,46 @@ _vboxmanage_mediumio_stream() { '--output=[The output filename]: :_files' } +(( $+functions[_vboxmanage_usbfilter] )) || +_vboxmanage_usbfilter() { + local ret=1 + + _arguments -C \ + '1: :(add modify remove)' \ + '*:: :->arg' \ + && ret=0 + + case $state in + (arg) + case $words[1] in + (add|modify) + _arguments \ + '--action=[Specifies whether to permit VMs access to devices]: :(ignore hold)' \ + '--active=[Specifies whether the USB filter is active or temporarily disabled]: :(yes no)' \ + '--manufacturer=[Specifies a manufacturer ID filter as a string]:manufacturer' \ + '--maskedinterfaces=[Specifies a masked interface filter]:interfaces' \ + '--name=[Specifies the name of the filter]:filter' \ + '--product=[Specifies a product ID filter as a string]:product' \ + '--productid=[Specifies a product ID filter]:product_id' \ + '--remote=[Specifies a remote or not]: :(yes no)' \ + '--revision=[Specifies a revision ID filter]:revision' \ + '--serialnumber=[Specifies a serial number filter as a string]:serial' \ + '--target=[Specifies the VM that the filter is attached to]: :_vboxmachines' \ + '--vendorid=[Specifies a vendor ID filter]:vendor_id' \ + && ret=0 + ;; + (remove) + _arguments \ + '--target=[Specifies the VM that the filter is attached to]: :_vboxmachines' \ + && ret=0 + ;; + esac + ;; + esac + + return $ret +} + (( $+functions[_vboxmanage_guestproperty] )) || _vboxmanage_guestproperty() { local ret=1 |
