bug-readline
[Top][All Lists]
Advanced

[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: Mon, 11 Feb 2019 16:07:57 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.5.0

On 2/10/19 6:34 PM, Dario Niedermann wrote:
> Hi. I'm using readline-7.0 on Linux/x86_64, but in 8.0's CHANGES file
> I've seen no fixes for the behaviour I'm about to describe.
> 
> The '$' symbol before a variable gets incorrectly escaped on successful
> completion, if the matching item too is escaped (for example because it
> contains spaces).
> 
> Here's how to reproduce it. Set readline to vi-mode (possibly unneeded),
> store an existing directory's full path into $DIR and `touch' a file
> called for example 'matching item' inside that directory. Then type:
> 
> $ ls $DIR/match<TAB>
> 
> $ ls \$DIR/matching\ item        <-- result
> 
> The fact that the '$' is escaped means that $1 is no longer recognized
> by the shell.

I can't reproduce this:

$ echo $BASH_VERSION
5.0.2(2)-release
$ DIR=$HOME
$ 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]

If you're using bash-completion, try removing the completion for ls and
trying again.

Chet

-- 
``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/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]