Tilde expansion on the command line is very annoying when you don't want
it. The tilde expansion is done anyway if the file /etc/bash_completion
is loaded (root account does not load it). For testing, I just modified
that file to work for me. Beware that modification may break others
stuff in the completions.
file /etc/bash_completion around line 324
_expand()
{
[ "$cur" != "${cur%\\}" ] && cur="$cur\\"
# expand ~username type directory specifications
if [[ "$cur" == \~*/* ]]; then
# avoiding tilde expansion
# eval cur=$cur
cur=$cur
elif [[ "$cur" == \~* ]]; then
cur=${cur#\~}
COMPREPLY=( $( compgen -P '~' -u $cur ) )
return ${#COMPREPLY[@]}
fi
}
Regards,
Alain Greppin
PS: the same applies for sid