Parcourir la source

Merge pull request #12922 from tianon/complete-repos-on-pull-all

Only complete repos with "docker pull -a"
Sebastiaan van Stijn il y a 10 ans
Parent
commit
b58f48ae42
1 fichiers modifiés avec 8 ajouts et 0 suppressions
  1. 8 0
      contrib/completion/bash/docker

+ 8 - 0
contrib/completion/bash/docker

@@ -679,6 +679,14 @@ _docker_pull() {
 		*)
 			local counter=$(__docker_pos_first_nonflag)
 			if [ $cword -eq $counter ]; then
+				for arg in "${COMP_WORDS[@]}"; do
+					case "$arg" in
+						--all-tags|-a)
+							__docker_image_repos
+							return
+							;;
+					esac
+				done
 				__docker_image_repos_and_tags
 			fi
 			;;