Fix bash completion on systems where extglob is not set

Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 211e3b0df67d17989c7aff63d1a0098ad61f07a3)
This commit is contained in:
Harald Albers
2015-11-12 15:12:58 -05:00
committed by Tibor Vass
parent 736ba2937e
commit da9b925066
+6
View File
@@ -42,6 +42,9 @@
# options immediately following their corresponding long form.
# This order should be applied to lists, alternatives and code blocks.
__docker_previous_extglob_setting=$(shopt -p extglob)
shopt -s extglob
__docker_q() {
docker ${host:+-H "$host"} ${config:+--config "$config"} 2>/dev/null "$@"
}
@@ -1864,4 +1867,7 @@ _docker() {
return 0
}
eval "$__docker_previous_extglob_setting"
unset __docker_previous_extglob_setting
complete -F _docker docker