Add natnetwork subcommand completion
This commit is contained in:
parent
a6f3ed2616
commit
8d40ac67bf
|
@ -309,7 +309,7 @@ _vboxmanage() {
|
|||
# TODO
|
||||
;;
|
||||
(natnetwork)
|
||||
# TODO
|
||||
_vboxmanage_natnetwork && ret=0
|
||||
;;
|
||||
(hostonlyif)
|
||||
# TODO
|
||||
|
@ -1003,6 +1003,45 @@ _vboxmanage_guestproperty() {
|
|||
return $ret
|
||||
}
|
||||
|
||||
(( $+functions[_vboxmanage_natnetwork] )) ||
|
||||
_vboxmanage_natnetwork() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'1: :(add list modify remove start stop)' \
|
||||
'*:: :->arg' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(arg)
|
||||
case $words[1] in
|
||||
(add|modify)
|
||||
_arguments \
|
||||
'(--disable --enable)--disable[Disables the NAT network service]' \
|
||||
'(--disable --enable)--enable[Enable the NAT network service]' \
|
||||
'--natname=[Specifies the name of the new internal network interface on the host OS]:name' \
|
||||
'--network=[Specifies the static or DHCP network address and mask of the NAT service interface]:network' \
|
||||
'--dhcp=[Enables or disables the DHCP server]: :(on off)' \
|
||||
'--ipv6=[Enables or disables IPv6]: :(on off)' \
|
||||
'--loopback-4=[Enables an IPv4 loopback interface by using the specified rule]:rule' \
|
||||
'--loopback-6=[Enables an IPv6 loopback interface by using the specified rule]:rule' \
|
||||
'--port-forward-4=[Enables IPv4 port forwarding by using the rule specified by rule]' \
|
||||
'--port-forward-6=[Enables IPv6 port forwarding by using the rule specified by rule]' \
|
||||
'*: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(remove|start|stop)
|
||||
_arguments \
|
||||
'--natname=[Specifies the name of the NAT]:name' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
(( $+functions[_vboxmanage_usbdevsource] )) ||
|
||||
_vboxmanage_usbdevsource() {
|
||||
local ret=1
|
||||
|
|
Loading…
Reference in New Issue