Bash shell tab completion, don't expand the ~
Disabling tilde expansion is quick and painless. Open up ~/.bashrc
and insert this:
_expand()
{
return 0;
}
This will override the expand function from /etc/bash_completion
. I'd recommend commenting on what it does above the function in case you want the expansion back in the future. Changes will take effect in a new instance.
With newer bash_completion it seems you also need to override __expand_tilde_by_ref:
__expand_tilde_by_ref() {
return 0
}