On 02/24/2011 03:14 PM, Michael Kalisz wrote: > $ echo $PWD/<TAB> > will expand the $PWD variable to your current directory > > while in bash, version 4.2.0(1)-release: > > $ echo $PWD/<TAB> > will just escape the $ in front of the $ variable i.e: > > $ echo \$PWD/ > The shell-expand-line (Ctrl-Alt-e) works but before I could use just TAB > > Any hints why? Any way to get the 4.1 behavior in 4.2? > > Can someone confirm... Is this a bug or a feature?
I'm not the developer, but in my mind, this is a welcome feature. TAB-completion should NOT modify what I typed, and I consider the 4.1 behavior to be the bug. Consider if I have parallel directory structures a/c and b/c. If I do: d=a $d/c/test d=b $d/c/test I want to run two different programs. Now, instead of a one-letter name, consider that it is something longer, like $HOME. If typing TAB expands the variable, instead of keeping it intact, then I can't do: $HOME/c/t-TAB $HOME=b UP-UP-ENTER to repeat my test in a new directory, since tab completion wiped out that I want to evaluate $HOME every time. (The same goes for command substitution - bash should never pre-maturely lock me in to a single expansion during tab completion.) -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature