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-20 08:50:04 +02:00 committed by Tibor Vass
parent 120b57a61c
commit f533df0821
1 changed files with 12 additions and 12 deletions

View File

@ -1249,7 +1249,17 @@ _docker_container_ps() {
} }
_docker_container_rename() { _docker_container_rename() {
_docker_rename 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_restart() { _docker_container_restart() {
@ -2507,17 +2517,7 @@ _docker_push() {
} }
_docker_rename() { _docker_rename() {
case "$cur" in _docker_container_rename
-*)
COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
;;
*)
local counter=$(__docker_pos_first_nonflag)
if [ $cword -eq $counter ]; then
__docker_complete_containers_all
fi
;;
esac
} }
_docker_restart() { _docker_restart() {