Merge pull request #5670 from briandealwis/patch-1

Fix bash completion on systems where extglob is not set
This commit is contained in:
Joffrey F 2018-02-12 10:45:05 -08:00 committed by GitHub
commit 56b2a80d50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -16,6 +16,8 @@
# below to your .bashrc after bash completion features are loaded
# . ~/.docker-compose-completion.sh
__docker_compose_previous_extglob_setting=$(shopt -p extglob)
shopt -s extglob
__docker_compose_q() {
docker-compose 2>/dev/null "${top_level_options[@]}" "$@"
@ -658,4 +660,7 @@ _docker_compose() {
return 0
}
eval "$__docker_compose_previous_extglob_setting"
unset __docker_compose_previous_extglob_setting
complete -F _docker_compose docker-compose docker-compose.exe