Merge pull request #1391 from albers/completion-extglob

Fix #1386 by ensuring that exglob is set in bash completion
This commit is contained in:
Daniel Nephin 2015-05-06 10:46:13 -04:00
commit 4817d5944c
1 changed files with 5 additions and 1 deletions

View File

@ -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
}