1
0
mirror of https://github.com/docker/cli.git synced 2026-01-16 20:22:36 +03:00

Move bash completion logic to new subcommand: port

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 120b57a61c
Component: cli
This commit is contained in:
Harald Albers
2016-10-19 19:23:18 +02:00
committed by Tibor Vass
parent 7f9ae43944
commit aa3a48c359

View File

@@ -1226,7 +1226,17 @@ _docker_container_pause() {
}
_docker_container_port() {
_docker_port
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
;;
*)
local counter=$(__docker_pos_first_nonflag)
if [ $cword -eq $counter ]; then
__docker_complete_containers_all
fi
;;
esac
}
# TODO new command
@@ -2453,17 +2463,7 @@ _docker_pause() {
}
_docker_port() {
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
;;
*)
local counter=$(__docker_pos_first_nonflag)
if [ $cword -eq $counter ]; then
__docker_complete_containers_all
fi
;;
esac
_docker_container_port
}
_docker_ps() {