On Fri, Feb 25, 2011 at 09:46:58AM +0000, Davide Brini wrote: > Maybe, but then it shouldn't escape the $ either, as the OP is reporting for > 4.2 (I don't have a 4.2 handy to test it).
I actually noticed this quite recently, but didn't think to bring it up. I had just typed some "cd" command, and then realized I wanted to view a file in the directory where I had just been. So instead of changing directory again, I typed "cd $OLDPWD/foo<TAB>" -- and the $OLDPWD became \$OLDPWD and did not do as I wished. Fortunately the workaround was simple enough -- once the filename had been completed I went back and x'ed out the \.