[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-readline] Bash escapes '$' on successful completion
From: |
Chet Ramey |
Subject: |
Re: [Bug-readline] Bash escapes '$' on successful completion |
Date: |
Tue, 12 Feb 2019 09:50:56 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 |
On 2/11/19 8:08 PM, Dario Niedermann wrote:
> Il 11/02/2019 alle 22:07, Chet Ramey ha scritto:
>
>> I can't reproduce this:
> [...]
>> $ ls $DIR/bin <---- [TAB][TAB] after bi here
>> bin/ bin.freebsd/ bin.macosx/ bin.sun4-solaris2/
>> bin.bsd386/ bin.linux/ bin.sun4/ bin.sun4-solaris7/
>> $ ls $DIR/HTTPS.1.0 <---- [TAB][TAB] after HT
>> HTTPS.1.0.m.NIS.b.tar.gz HTTPS.1.09b.m.NIS.b.tar.gz
>> $ ls $DIR/HTTPS.1.09b.m.NIS.b.tar.gz <---- 9[TAB]
>
> That's probably because none of your final matches contained spaces
> that needed to be escaped.
OK, I see. A filename like '$DIR/Local Applications' is inherently
ambiguous when you go to quote it, since the `$' and ` ' are both
characters that need to be quoted. If you encounter this enough for
it to be a problem, the `direxpand' option exists as a workaround.
There were several spirited discussions of this issue back in 2011,
which led to the `direxpand' option.
This is a bash-specific issue, not a readline one.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU address@hidden http://tiswww.cwru.edu/~chet/