Skip to content

Commit

Permalink
Fix bash completion when extglob is not set
Browse files Browse the repository at this point in the history
Signed-off-by: Harald Albers <github@albersweb.de>
  • Loading branch information
albers committed Sep 16, 2015
1 parent 606c6e8 commit 0a5aac1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/completion/bash/docker
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
Expand Down

0 comments on commit 0a5aac1

Please sign in to comment.