The issue doesn't seem to be related to Bash version. And for distribution files (/etc/bash*), I have seen the issue on Ubuntu and a few others (not necessarily "Debianeses").
A few versions that have the problem right now, different distros:
GNU bash, version 3.2.48(1)-release (i486-pc-linux-gnu)
GNU bash, version 4.2.25(1)-release (i686-pc-linux-gnu)
GNU bash, version 4.2.37(1)-release (x86_64-pc-linux-gnu)
And the issue does not happen for all commands. For example (and "[xxx]" is a keypress here!) :
Code:
# This expands:
vim ~/t[TAB]
# This doesn't:
alias vviimm=vim[ENTER] vviimm ~/t[TAB]
Want me to paste the /etc/bash_completion file (which I mostly don't understand) ? And maybe .bashrc and /etc/bashrc?
But trying to get rid of this I just did a "silly change" to ~/.bashrc to delete the _expand() function:
Code:
(...)
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
## 1. Should this properly fix it? Is it enough?
## 2. Any side effects? I don't know!
## 3. Should "__expand_tilde_by_ref()" be erased too?
function _expand() { return 0; }
(...)
Seems to work, but I wanted to be sure of what to do, instead of magical recipes of trial and error, undocumented effects¹. :-/
Edit:
¹ "undocumented" because the _expand* functions aren't clear for me to understand or don't have enough comments to do so.