Move bash completion logic to new subcommand: diff

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

View File

@ -1031,7 +1031,17 @@ _docker_container_create() {
} }
_docker_container_diff() { _docker_container_diff() {
_docker_diff 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_exec() { _docker_container_exec() {
@ -1317,17 +1327,7 @@ _docker_daemon() {
} }
_docker_diff() { _docker_diff() {
case "$cur" in _docker_container_diff
-*)
COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
;;
*)
local counter=$(__docker_pos_first_nonflag)
if [ $cword -eq $counter ]; then
__docker_complete_containers_all
fi
;;
esac
} }
_docker_events() { _docker_events() {