mirror of https://github.com/docker/cli.git
Add zsh completion for 'docker network connect --alias' and 'docker {create, run} --net-alias'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
This commit is contained in:
parent
19f41be56b
commit
b3b3392c97
|
@ -302,9 +302,10 @@ __docker_network_subcommand() {
|
|||
opts_help=("(: -)--help[Print usage]")
|
||||
|
||||
case "$words[1]" in
|
||||
(connect|disconnect)
|
||||
(connect)
|
||||
_arguments $(__docker_arguments) \
|
||||
$opts_help \
|
||||
"($help)*--alias=[Add network-scoped alias for the container]:alias: " \
|
||||
"($help -)1:network:__docker_networks" \
|
||||
"($help -)2:containers:__docker_containers" && ret=0
|
||||
;;
|
||||
|
@ -322,6 +323,12 @@ __docker_network_subcommand() {
|
|||
"($help)*--subnet=[Subnet in CIDR format that represents a network segment]:IP/mask: " \
|
||||
"($help -)1:Network Name: " && ret=0
|
||||
;;
|
||||
(disconnect)
|
||||
_arguments $(__docker_arguments) \
|
||||
$opts_help \
|
||||
"($help -)1:network:__docker_networks" \
|
||||
"($help -)2:containers:__docker_containers" && ret=0
|
||||
;;
|
||||
(inspect)
|
||||
_arguments $(__docker_arguments) \
|
||||
$opts_help \
|
||||
|
@ -506,6 +513,7 @@ __docker_subcommand() {
|
|||
"($help)--mac-address=[Container MAC address]:MAC address: "
|
||||
"($help)--name=[Container name]:name: "
|
||||
"($help)--net=[Connect a container to a network]:network mode:(bridge none container host)"
|
||||
"($help)*--net-alias=[Add network-scoped alias for the container]:alias: "
|
||||
"($help)--oom-kill-disable[Disable OOM Killer]"
|
||||
"($help)--oom-score-adj[Tune the host's OOM preferences for containers (accepts -1000 to 1000)]"
|
||||
"($help -P --publish-all)"{-P,--publish-all}"[Publish all exposed ports]"
|
||||
|
|
Loading…
Reference in New Issue