mirror of
https://github.com/docker/cli.git
synced 2026-01-16 20:22:36 +03:00
Move bash completion logic to new subcommand: tag
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 398d4706d3
Component: cli
This commit is contained in:
committed by
Tibor Vass
parent
80bf7faee3
commit
7fba500014
@@ -2226,7 +2226,25 @@ _docker_image_save() {
|
||||
}
|
||||
|
||||
_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() {
|
||||
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
|
||||
_docker_image_tag
|
||||
}
|
||||
|
||||
_docker_unpause() {
|
||||
|
||||
Reference in New Issue
Block a user