Add hostonlynet subcommand completion
This commit is contained in:
parent
337c43064e
commit
4c66875a7b
|
@ -315,7 +315,7 @@ _vboxmanage() {
|
|||
_vboxmanage_hostonlyif && ret=0
|
||||
;;
|
||||
(hostonlynet)
|
||||
# TODO
|
||||
_vboxmanage_hostonlynet && ret=0
|
||||
;;
|
||||
(dhcpserver)
|
||||
# TODO
|
||||
|
@ -1318,6 +1318,42 @@ _vboxmanage_hostonlyif() {
|
|||
return $ret
|
||||
}
|
||||
|
||||
(( $+functions[_vboxmanage_hostonlynet] )) ||
|
||||
_vboxmanage_hostonlynet() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'1: :(add modify remove)' \
|
||||
'*:: :->arg' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(arg)
|
||||
case $words[1] in
|
||||
(add|modify)
|
||||
_arguments \
|
||||
'--name=[The host-only network name]:name' \
|
||||
'--id=[The host-only network uuid]:netid' \
|
||||
'--netmask=[The network mask]:netmask' \
|
||||
'--lower-ip=[The lower IP address range for handing out via DHCP]:lower' \
|
||||
'--upper-ip=[The upper IP address range for handing out via DHCP]:upper' \
|
||||
'(--enable --disable)--enable[Enable the host-only network]' \
|
||||
'(--enable --disable)--disable[Disable the host-only network]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(remove)
|
||||
_arguments \
|
||||
'--name=[The host-only network name]:name' \
|
||||
'--id=[The host-only network uuid]:netid' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
(( $+functions[_vboxmanage_usbdevsource] )) ||
|
||||
_vboxmanage_usbdevsource() {
|
||||
local ret=1
|
||||
|
|
Loading…
Reference in New Issue