From 0dc25f1cdf96df7536a0793898c60691c0b35b89 Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Tue, 25 Apr 2017 13:19:22 +0200 Subject: [PATCH] Add bash completion for `docker-compose up --scale` Signed-off-by: Harald Albers --- contrib/completion/bash/docker-compose | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/contrib/completion/bash/docker-compose b/contrib/completion/bash/docker-compose index 739ba39b0..2c2be61c7 100644 --- a/contrib/completion/bash/docker-compose +++ b/contrib/completion/bash/docker-compose @@ -498,10 +498,19 @@ _docker_compose_unpause() { _docker_compose_up() { case "$prev" in + =) + COMPREPLY=("$cur") + return + ;; --exit-code-from) __docker_compose_services_all return ;; + --scale) + COMPREPLY=( $(compgen -S "=" -W "$(___docker_compose_all_services_in_compose_file)" -- "$cur") ) + __docker_compose_nospace + return + ;; --timeout|-t) return ;; @@ -509,7 +518,7 @@ _docker_compose_up() { case "$cur" in -*) - COMPREPLY=( $( compgen -W "--abort-on-container-exit --build -d --exit-code-from --force-recreate --help --no-build --no-color --no-deps --no-recreate --timeout -t --remove-orphans" -- "$cur" ) ) + COMPREPLY=( $( compgen -W "--abort-on-container-exit --build -d --exit-code-from --force-recreate --help --no-build --no-color --no-deps --no-recreate --remove-orphans --scale --timeout -t" -- "$cur" ) ) ;; *) __docker_compose_services_all