Move bash completion logic to new subcommand: top

Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
Harald Albers 2016-10-20 09:16:48 +02:00
parent 150dcabc0f
commit 4bab104761

View file

@ -1629,7 +1629,17 @@ _docker_container_stop() {
}
_docker_container_top() {
_docker_top
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
;;
*)
local counter=$(__docker_pos_first_nonflag)
if [ $cword -eq $counter ]; then
__docker_complete_containers_running
fi
;;
esac
}
_docker_container_unpause() {
@ -3022,17 +3032,7 @@ _docker_update() {
}
_docker_top() {
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
;;
*)
local counter=$(__docker_pos_first_nonflag)
if [ $cword -eq $counter ]; then
__docker_complete_containers_running
fi
;;
esac
_docker_container_top
}
_docker_version() {