mirror of https://github.com/docker/cli.git
Minor bash completion improvements/fixes
Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
parent
5ee3b9b461
commit
53376b60c6
|
@ -1372,10 +1372,7 @@ _docker_container_commit() {
|
||||||
if [ "$cword" -eq "$counter" ]; then
|
if [ "$cword" -eq "$counter" ]; then
|
||||||
__docker_complete_containers_all
|
__docker_complete_containers_all
|
||||||
return
|
return
|
||||||
fi
|
elif [ "$cword" -eq "$((counter + 1))" ]; then
|
||||||
(( counter++ ))
|
|
||||||
|
|
||||||
if [ "$cword" -eq "$counter" ]; then
|
|
||||||
__docker_complete_images --repo --tag
|
__docker_complete_images --repo --tag
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
@ -2593,7 +2590,7 @@ _docker_image_history() {
|
||||||
COMPREPLY=( $( compgen -W "--format --help --human=false -H=false --no-trunc --quiet -q" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "--format --help --human=false -H=false --no-trunc --quiet -q" -- "$cur" ) )
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
local counter=$(__docker_pos_first_nonflag)
|
local counter=$(__docker_pos_first_nonflag '--format')
|
||||||
if [ "$cword" -eq "$counter" ]; then
|
if [ "$cword" -eq "$counter" ]; then
|
||||||
__docker_complete_images --force-tag --id
|
__docker_complete_images --force-tag --id
|
||||||
fi
|
fi
|
||||||
|
@ -2619,11 +2616,9 @@ _docker_image_import() {
|
||||||
*)
|
*)
|
||||||
local counter=$(__docker_pos_first_nonflag '--change|-c|--message|-m')
|
local counter=$(__docker_pos_first_nonflag '--change|-c|--message|-m')
|
||||||
if [ "$cword" -eq "$counter" ]; then
|
if [ "$cword" -eq "$counter" ]; then
|
||||||
|
_filedir
|
||||||
return
|
return
|
||||||
fi
|
elif [ "$cword" -eq "$((counter + 1))" ]; then
|
||||||
(( counter++ ))
|
|
||||||
|
|
||||||
if [ "$cword" -eq "$counter" ]; then
|
|
||||||
__docker_complete_images --repo --tag
|
__docker_complete_images --repo --tag
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
@ -2798,10 +2793,7 @@ _docker_image_tag() {
|
||||||
if [ "$cword" -eq "$counter" ]; then
|
if [ "$cword" -eq "$counter" ]; then
|
||||||
__docker_complete_images --force-tag --id
|
__docker_complete_images --force-tag --id
|
||||||
return
|
return
|
||||||
fi
|
elif [ "$cword" -eq "$((counter + 1))" ]; then
|
||||||
(( counter++ ))
|
|
||||||
|
|
||||||
if [ "$cword" -eq "$counter" ]; then
|
|
||||||
__docker_complete_images --repo --tag
|
__docker_complete_images --repo --tag
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue