Skip to content

Commit

Permalink
Quote unset array element to avoid globbing interference (Alioth: #31…
Browse files Browse the repository at this point in the history
…4708)
  • Loading branch information
Dams Nadé authored and scop committed Jun 3, 2014
1 parent 9186add commit 84135d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bash_completion
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ _variables()
_filedir
for i in ${!COMPREPLY[@]}; do
if [[ ${COMPREPLY[i]} == *.tab ]]; then
unset COMPREPLY[i]
unset 'COMPREPLY[i]'
continue
elif [[ -d ${COMPREPLY[i]} ]]; then
COMPREPLY[i]+=/
Expand Down Expand Up @@ -1686,7 +1686,7 @@ _command_offset()
COMP_WORDS[i]=${COMP_WORDS[i+$word_offset]}
done
for (( i; i <= COMP_CWORD; i++ )); do
unset COMP_WORDS[i]
unset 'COMP_WORDS[i]'
done
((COMP_CWORD -= $word_offset))

Expand Down

0 comments on commit 84135d7

Please sign in to comment.