From 1579a125a3b50acb9d34b116078c133ace28fded Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Wed, 6 May 2015 09:33:22 +0200 Subject: [PATCH] Ensure that exglob is set in bash completion Signed-off-by: Harald Albers --- contrib/completion/bash/docker-compose | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/completion/bash/docker-compose b/contrib/completion/bash/docker-compose index 548773d61..ec0f23481 100644 --- a/contrib/completion/bash/docker-compose +++ b/contrib/completion/bash/docker-compose @@ -94,7 +94,7 @@ _docker-compose_build() { _docker-compose_docker-compose() { case "$prev" in --file|-f) - _filedir y?(a)ml + _filedir "y?(a)ml" return ;; --project-name|-p) @@ -303,6 +303,9 @@ _docker-compose_up() { _docker-compose() { + local previous_extglob_setting=$(shopt -p extglob) + shopt -s extglob + local commands=( build help @@ -352,6 +355,7 @@ _docker-compose() { local completions_func=_docker-compose_${command} declare -F $completions_func >/dev/null && $completions_func + eval "$previous_extglob_setting" return 0 }