From 583c673c8a1cdf5473c93d28f95433fffec55daf Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Thu, 16 Mar 2017 11:29:10 +0100 Subject: [PATCH] Add bash completion for `build --build-arg` Signed-off-by: Harald Albers --- contrib/completion/bash/docker-compose | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/contrib/completion/bash/docker-compose b/contrib/completion/bash/docker-compose index 2591f500b..d39a6da25 100644 --- a/contrib/completion/bash/docker-compose +++ b/contrib/completion/bash/docker-compose @@ -110,9 +110,17 @@ __docker_compose_services_stopped() { _docker_compose_build() { + case "$prev" in + --build-arg) + COMPREPLY=( $( compgen -e -- "$cur" ) ) + __docker_compose_nospace + return + ;; + esac + case "$cur" in -*) - COMPREPLY=( $( compgen -W "--force-rm --help --no-cache --pull" -- "$cur" ) ) + COMPREPLY=( $( compgen -W "--build-arg --force-rm --help --no-cache --pull" -- "$cur" ) ) ;; *) __docker_compose_services_from_build