From 14411fae610e63006a6bc1048c06caab11fc0e29 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 1 May 2015 10:04:24 -0600 Subject: [PATCH] Only complete repos with "docker pull -a" With this, `docker pull deb` will show all `debian:*` tags, as before, but `docker pull -a deb` will complete directly to just `debian`. :+1: Signed-off-by: Andrew "Tianon" Page --- contrib/completion/bash/docker | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index 5b7a102a68..1aa0835140 100755 --- a/contrib/completion/bash/docker +++ b/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 ;;