mirror of https://github.com/docker/cli.git
Move bash completion logic to new subcommand: tag
Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
parent
54bb65787c
commit
398d4706d3
|
@ -2226,7 +2226,25 @@ _docker_image_save() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_docker_image_tag() {
|
_docker_image_tag() {
|
||||||
_docker_tag
|
case "$cur" in
|
||||||
|
-*)
|
||||||
|
COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
local counter=$(__docker_pos_first_nonflag)
|
||||||
|
|
||||||
|
if [ $cword -eq $counter ]; then
|
||||||
|
__docker_complete_image_repos_and_tags
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
(( counter++ ))
|
||||||
|
|
||||||
|
if [ $cword -eq $counter ]; then
|
||||||
|
__docker_complete_image_repos_and_tags
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3134,25 +3152,7 @@ _docker_stop() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_docker_tag() {
|
_docker_tag() {
|
||||||
case "$cur" in
|
_docker_image_tag
|
||||||
-*)
|
|
||||||
COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
local counter=$(__docker_pos_first_nonflag)
|
|
||||||
|
|
||||||
if [ $cword -eq $counter ]; then
|
|
||||||
__docker_complete_image_repos_and_tags
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
(( counter++ ))
|
|
||||||
|
|
||||||
if [ $cword -eq $counter ]; then
|
|
||||||
__docker_complete_image_repos_and_tags
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_docker_unpause() {
|
_docker_unpause() {
|
||||||
|
|
Loading…
Reference in New Issue