aboutsummaryrefslogtreecommitdiffstats
path: root/src/_virtualbox
diff options
context:
space:
mode:
authorShohei YOSHIDA <syohex@gmail.com>2022-12-23 15:28:52 +0900
committerShohei YOSHIDA <syohex@gmail.com>2022-12-23 15:28:52 +0900
commita2d4ea00d93a38cfc8d4f29731010fb0c575be83 (patch)
tree8adc51d0403b11243c89df6590d6e781e94a0335 /src/_virtualbox
parentMerge pull request #962 from zsh-users/add-bandwidthctl (diff)
downloadzsh-completions-a2d4ea00d93a38cfc8d4f29731010fb0c575be83.tar
zsh-completions-a2d4ea00d93a38cfc8d4f29731010fb0c575be83.tar.gz
zsh-completions-a2d4ea00d93a38cfc8d4f29731010fb0c575be83.tar.bz2
zsh-completions-a2d4ea00d93a38cfc8d4f29731010fb0c575be83.tar.lz
zsh-completions-a2d4ea00d93a38cfc8d4f29731010fb0c575be83.tar.xz
zsh-completions-a2d4ea00d93a38cfc8d4f29731010fb0c575be83.tar.zst
zsh-completions-a2d4ea00d93a38cfc8d4f29731010fb0c575be83.zip
Add mediumio subcommand completion
Diffstat (limited to 'src/_virtualbox')
-rw-r--r--src/_virtualbox58
1 files changed, 57 insertions, 1 deletions
diff --git a/src/_virtualbox b/src/_virtualbox
index a2e04fb..6d47d47 100644
--- a/src/_virtualbox
+++ b/src/_virtualbox
@@ -282,7 +282,7 @@ _vboxmanage() {
&& ret=0
;;
(mediumio)
- # TODO
+ _vboxmanage_mediumio
;;
(setproperty)
_arguments \
@@ -499,6 +499,62 @@ _vboxmanage_bandwidthctl_set() {
'--limit=[Specifies the bandwidth limit for a bandwidth group]:limit'
}
+(( $+functions[_vboxmanage_mediumio] )) ||
+_vboxmanage_mediumio() {
+ local ret=1
+
+ _arguments -C \
+ '1: :(formatfat cat stream)' \
+ '*:: :->arg' \
+ && ret=0
+
+ case $state in
+ (arg)
+ local subcommand=$words[1]
+ if (( $+functions[_vboxmanage_mediumio_${subcommand}] )); then
+ _vboxmanage_mediumio_${subcommand} && ret=0
+ fi
+ ;;
+ esac
+
+ return $ret
+}
+
+(( $+functions[_vboxmanage_mediumio_formatfat] )) ||
+_vboxmanage_mediumio_formatfat() {
+ _arguments \
+ '--disk=[Either the UUID or filename of a harddisk image]: :_files' \
+ '--dvd=[Either the UUID or filename of a DVD image]: :_files' \
+ '--floppy=[Either the UUID or filename of a floppy image]: :_files' \
+ '--password-file=[The name of a file containing the medium encryption password]: :_files' \
+ '--quick[Quickformat the medium]'
+}
+
+(( $+functions[_vboxmanage_mediumio_cat] )) ||
+_vboxmanage_mediumio_cat() {
+ _arguments \
+ '--disk=[Either the UUID or filename of a harddisk image]: :_files' \
+ '--dvd=[Either the UUID or filename of a DVD image]: :_files' \
+ '--floppy=[Either the UUID or filename of a floppy image]: :_files' \
+ '--password-file=[The name of a file containing the medium encryption password]: :_files' \
+ '--hex[Dump as hex bytes]' \
+ '--offset=[The byte offset in the medium to start]:offset' \
+ '--size=[The number of bytes to dump]:size' \
+ '--output=[The output filename]: :_files'
+}
+
+(( $+functions[_vboxmanage_mediumio_stream] )) ||
+_vboxmanage_mediumio_stream() {
+ _arguments \
+ '--disk=[Either the UUID or filename of a harddisk image]: :_files' \
+ '--dvd=[Either the UUID or filename of a DVD image]: :_files' \
+ '--floppy=[Either the UUID or filename of a floppy image]: :_files' \
+ '--password-file=[The name of a file containing the medium encryption password]: :_files' \
+ '--format=[The format of the destination image]:format' \
+ '--variant=[The medium variant for the destination]:variant' \
+ '--output=[The output filename]: :_files'
+}
+
(( $+functions[_vboxheadless] )) ||
_vboxheadless() {
local ret=1