1
0
mirror of https://github.com/docker/cli.git synced 2026-01-18 08:21:31 +03:00

Fix bash completion when extglob is not set

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: f5eb62c180
Component: cli
This commit is contained in:
Harald Albers
2015-09-16 18:09:35 +02:00
committed by Tibor Vass
parent e91c3f51fc
commit e19ee5c257

View File

@@ -182,12 +182,12 @@ __docker_pos_first_nonflag() {
# globs like '--log-level|-l'
# Only positions between the command and the current word are considered.
__docker_value_of_option() {
local option_glob=$1
local option_extglob=$(__docker_to_extglob "$1")
local counter=$((command_pos + 1))
while [ $counter -lt $cword ]; do
case ${words[$counter]} in
@($option_glob) )
$option_extglob )
echo ${words[$counter + 1]}
break
;;