1

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.

4
  • Probably the $ is escaped, not expanded.
    – user17383
    Feb 21, 2012 at 11:46
  • This is a new "feature" which I've seen appear in Ubuntu since 11.10. Before that, it would expand $HOME as soon as you pressed TAB. But I have no solution. Feb 21, 2012 at 11:48
  • Vim is not using any shell, vim has it's own completion implementation.
    – Jan Hudec
    Feb 21, 2012 at 11:49
  • Try with zsh. It has many nice extra features compared to bash.
    – Jan Hudec
    Feb 21, 2012 at 11:50

1 Answer 1

3

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

2
  • 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .