Fix bash completion on systems where extglob is not set

Signed-off-by: Brian de Alwis <bsd@mt.ca>
This commit is contained in:
Brian de Alwis 2018-02-09 11:22:36 -05:00
parent 54afe3e1c0
commit bb8c2e1f45
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