Fix __reassemble_comp_words_by_ref for $COMP_CWORD == ${#COMP_WORDS[@]}

This commit is contained in:
Christian von Roques 2012-05-22 16:10:58 -04:00 committed by Igor Murzov
parent 30f93357c8
commit dc150937d1

View File

@ -284,6 +284,7 @@ __reassemble_comp_words_by_ref()
# Indicate new cword # Indicate new cword
[[ $i == $COMP_CWORD ]] && eval $3=$j [[ $i == $COMP_CWORD ]] && eval $3=$j
done done
[[ $i == $COMP_CWORD ]] && eval $3=$j
else else
# No, list of word completions separators hasn't changed; # No, list of word completions separators hasn't changed;
eval $2=\( \"\${COMP_WORDS[@]}\" \) eval $2=\( \"\${COMP_WORDS[@]}\" \)