Move bash completion logic to new subcommand: pull
Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
parent
df486631bc
commit
6864f3ae5a
1 changed files with 20 additions and 20 deletions
|
@ -2148,7 +2148,25 @@ _docker_image_prune() {
|
|||
}
|
||||
|
||||
_docker_image_pull() {
|
||||
_docker_pull
|
||||
case "$cur" in
|
||||
-*)
|
||||
COMPREPLY=( $( compgen -W "--all-tags -a --disable-content-trust=false --help" -- "$cur" ) )
|
||||
;;
|
||||
*)
|
||||
local counter=$(__docker_pos_first_nonflag)
|
||||
if [ $cword -eq $counter ]; then
|
||||
for arg in "${COMP_WORDS[@]}"; do
|
||||
case "$arg" in
|
||||
--all-tags|-a)
|
||||
__docker_complete_image_repos
|
||||
return
|
||||
;;
|
||||
esac
|
||||
done
|
||||
__docker_complete_image_repos_and_tags
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
_docker_image_push() {
|
||||
|
@ -3005,25 +3023,7 @@ _docker_ps() {
|
|||
}
|
||||
|
||||
_docker_pull() {
|
||||
case "$cur" in
|
||||
-*)
|
||||
COMPREPLY=( $( compgen -W "--all-tags -a --disable-content-trust=false --help" -- "$cur" ) )
|
||||
;;
|
||||
*)
|
||||
local counter=$(__docker_pos_first_nonflag)
|
||||
if [ $cword -eq $counter ]; then
|
||||
for arg in "${COMP_WORDS[@]}"; do
|
||||
case "$arg" in
|
||||
--all-tags|-a)
|
||||
__docker_complete_image_repos
|
||||
return
|
||||
;;
|
||||
esac
|
||||
done
|
||||
__docker_complete_image_repos_and_tags
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
_docker_image_pull
|
||||
}
|
||||
|
||||
_docker_push() {
|
||||
|
|
Loading…
Reference in a new issue