mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Move bash completion logic to new subcommand: tag
Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
parent
18e8c59fbb
commit
28469b5720
1 changed files with 20 additions and 20 deletions
|
@ -2221,7 +2221,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
|
||||
}
|
||||
|
||||
|
||||
|
@ -3129,25 +3147,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() {
|
||||
|
|
Loading…
Add table
Reference in a new issue