Quote unset array element to avoid globbing interference (Alioth: #314708)
This commit is contained in:
parent
9186add629
commit
84135d756b
@ -636,7 +636,7 @@ _variables()
|
|||||||
_filedir
|
_filedir
|
||||||
for i in ${!COMPREPLY[@]}; do
|
for i in ${!COMPREPLY[@]}; do
|
||||||
if [[ ${COMPREPLY[i]} == *.tab ]]; then
|
if [[ ${COMPREPLY[i]} == *.tab ]]; then
|
||||||
unset COMPREPLY[i]
|
unset 'COMPREPLY[i]'
|
||||||
continue
|
continue
|
||||||
elif [[ -d ${COMPREPLY[i]} ]]; then
|
elif [[ -d ${COMPREPLY[i]} ]]; then
|
||||||
COMPREPLY[i]+=/
|
COMPREPLY[i]+=/
|
||||||
@ -1686,7 +1686,7 @@ _command_offset()
|
|||||||
COMP_WORDS[i]=${COMP_WORDS[i+$word_offset]}
|
COMP_WORDS[i]=${COMP_WORDS[i+$word_offset]}
|
||||||
done
|
done
|
||||||
for (( i; i <= COMP_CWORD; i++ )); do
|
for (( i; i <= COMP_CWORD; i++ )); do
|
||||||
unset COMP_WORDS[i]
|
unset 'COMP_WORDS[i]'
|
||||||
done
|
done
|
||||||
((COMP_CWORD -= $word_offset))
|
((COMP_CWORD -= $word_offset))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user