Comment 2 for bug 194860

Revision history for this message
Mikael Gerdin (mgerdin) wrote :

This problem seems to be because of a change in the file /etc/bash_completion
The change is in almost all completion definitions from:
"cur=${COMP_WORDS[COMP_CWORD]}"
to
"cur=`_get_cword`"
Replacing the /etc/bash_completion with the one from gutsy fixes this for me, and the problem that the fix is supposed to address is something that has never bothered me:
# Get the word to complete
# This is nicer than ${COMP_WORDS[$COMP_CWORD]}, since it handles cases
# where the user is completing in the middle of a word.
# (For example, if the line is "ls foobar",
# and the cursor is here --------> ^
# it will complete just "foo", not "foobar", which is what the user wants.)