$ becomes \$ upon tab expansion

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

$ becomes \$ upon tab expansion

積丹尼 Dan Jacobson
$ ls $HOME/xx/yy/z<TAB>
becomes
$ ls \$HOME/xx/yy/zz

It should become
$ ls $HOME/xx/yy/zz
else it will fail when the user finally hits RET.

(Assume a zz file already exists. "ls" here is just an example. same for
"cat" etc.) Bash 5.0.16

Reply | Threaded
Open this post in threaded view
|

Re: $ becomes \$ upon tab expansion

Chet Ramey
On 5/24/20 4:50 PM, 積丹尼 Dan Jacobson wrote:
> $ ls $HOME/xx/yy/z<TAB>
> becomes
> $ ls \$HOME/xx/yy/zz

It doesn't. Maybe it does when you use bash-completion.


--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    [hidden email]    http://tiswww.cwru.edu/~chet/

Reply | Threaded
Open this post in threaded view
|

Re: $ becomes \$ upon tab expansion

積丹尼 Dan Jacobson
Reply | Threaded
Open this post in threaded view
|

Re: $ becomes \$ upon tab expansion

Todd Zullinger
積丹尼 Dan Jacobson wrote:
> OK, filed https://github.com/scop/bash-completion/issues/417 .

I think https://github.com/scop/bash-completion/issues/323
is an earlier report of the same core issue.  That report
doesn't contain details, just links to older reports from
around the time bash-4.2 was released.

In many/most of those older reports, the issue was due to a
change in the expansion behavior from 4.1; 4.2 patch 29
adjusted it.  The #323 bash-completion ticket seems to be
conflating the issue in 4.2 (prior to patch 29) with the
existing bash-completion issue.

--
Todd