Fix bash completion on systems where extglob is not set
Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
parent
52f5fdafc1
commit
7fa96238a6
@ -49,6 +49,9 @@
|
|||||||
# options immediately following their corresponding long form.
|
# options immediately following their corresponding long form.
|
||||||
# This order should be applied to lists, alternatives and code blocks.
|
# This order should be applied to lists, alternatives and code blocks.
|
||||||
|
|
||||||
|
__docker_previous_extglob_setting=$(shopt -p extglob)
|
||||||
|
shopt -s extglob
|
||||||
|
|
||||||
__docker_q() {
|
__docker_q() {
|
||||||
docker ${host:+-H "$host"} ${config:+--config "$config"} 2>/dev/null "$@"
|
docker ${host:+-H "$host"} ${config:+--config "$config"} 2>/dev/null "$@"
|
||||||
}
|
}
|
||||||
@ -1890,4 +1893,7 @@ _docker() {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
eval "$__docker_previous_extglob_setting"
|
||||||
|
unset __docker_previous_extglob_setting
|
||||||
|
|
||||||
complete -F _docker docker
|
complete -F _docker docker
|
||||||
|
Loading…
x
Reference in New Issue
Block a user