My os is ubuntu 11.10. In the terminal when i input cp $HOME/
then type TAB. It will change to cp \$HOME/
and won't give any hint about what's in this directory.
But in vim, it will work just as i want. I heard that vim is using zsh
instead of bash
.
1 Answer
It's a bug: In natty, bash completion now quotes shell variable references rather than expanding them
See comment #7 for a workaround or this forum post: Bash auto-complete of environment variables - Comment #7
-
Obviously, it's the best answer. But i am wondering how do you find it. Do you often check launchpad? Thank you. Feb 22, 2012 at 9:12
-
Nope. I just did a couple of searches using keywords that I found in the forum post. That turned up the bug report. Feb 23, 2012 at 8:25
$
is escaped, not expanded.$HOME
as soon as you pressed TAB. But I have no solution.zsh
. It has many nice extra features compared to bash.