In article <
201406290...@kylheku.com>,
Kaz Kylheku <
k...@kylheku.com> wrote:
>On 2014-06-29, Kenny McCormack <
gaz...@shell.xmission.com> wrote:
>> One thing that has annoyed me for a long time is this:
>>
>> At the prompt, type in:
>>
>> $ echo $OLDPWD/somef<tab>
>>
>> I.e., assume that a file called "somefile" exists in $OLDPWD. When you hit
>><tab>, it fills in the "ile", as expected, but it also puts a backslash in
>> front of the $ sign, so you end up with:
>>
>> $ echo \$OLDPWD/somefile
>
>Cannot reproduce.
It does seem to be version-of-bash dependent. Maybe I need to post a
you-tube vid of it happening...
>In Bash "3.2.29(1)-release" on a Debian box, the variable is removed and replaced with
>its expansion.
On MACOSX, with "3.2.48(1)-release", the bad behavior does not happen. As
you say, the variable is expanded out when you hit tab.
>In Bash "4.2.25(1)-release" on an Ubuntu box, the variable stays unexpanded,
>and no dollar sign is added.
(I assume you meant "backslash"...)
On MACOSX, with "4.3.0(1)-release", the bad behavior also does not happen.
The variable stays un-expanded, and you see:
$ echo $OLDPWD/somefile
However, on the Raspberry Pi, with "4.2.37(1)-release", it definitely
*does* happen, as described in the OP.
>> which is pretty much useless. I've gotten into the habit of going back and
>> removing the backslash, but I really wonder what delusion resulted in its
>> being there. Anyone know?
>
>Workaround: if you're in Emacs mode, try M-C-e (i.e. ESC Ctrl-E) to expand the
>variable, then do the tab completion.
I don't do Emacs.
But as usual, workarounds are cheap and plentiful; what I want is for it to
be fixed. Note, BTW, that this bug seems to be alive in the second newest
version to which I have access. In fact, it seems to be OK in 4.2.25 (per
your post) and 4.3.0, but broken in 4.2.37.
Maybe I just need to recompile bash from latest sources on the Pi.
--
One of the best lines I've heard lately:
Obama could cure cancer tomorrow, and the Republicans would be
complaining that he had ruined the pharmaceutical business.
(Heard on Stephanie Miller = but the sad thing is that there is an awful lot
of direct truth in it. We've constructed an economy in which eliminating
cancer would be a horrible disaster. There are many other such examples.)