Move bash completion logic to new subcommand: port

Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
Harald Albers 2016-10-19 19:23:18 +02:00 committed by Tibor Vass
parent b659865f57
commit 120b57a61c
1 changed files with 12 additions and 12 deletions

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() {