public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Bash $VAR expansion escapes the dollar instead of expanding
@ 2011-03-22 13:51 felix
  2011-03-23 14:55 ` Willie Wong
  0 siblings, 1 reply; 6+ messages in thread
From: felix @ 2011-03-22 13:51 UTC (permalink / raw
  To: gentoo-user

I have an env var, WWW=/home/www/felix, which I have always used with
tab completion without problems.

    cd $WWW/ht<tab>ph<tab>20110318

would expand in steps

    cd /home/www/felix/htdocs/
    cd /home/www/felix/htdocs/photos/
    cd /home/www/felix/htdocs/photos/20110318

But some recent bash upgrade has scuppered this.  <tab> no longer
expands the $WWW; instead, it escapes the $, adds a space at the end,
and thinks itself clever.

    cd \$WWW/ht ph

which does me no good.

I'll be danged if I can figure out any google-fu to search for this,
and 'bash help'  and 'info bash' have done me no good either.

I do not know which specific bash upgrade changed this, since I don't
have very many of these env vars I used similarly.  The current "bash
--version" is 4.2.8(2)-release, gentoo version is app-shells/bash-4.2_p8.

-- 
            ... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
     Felix Finch: scarecrow repairman & rocket surgeon / felix@crowfix.com
  GPG = E987 4493 C860 246C 3B1E  6477 7838 76E9 182E 8151 ITAR license #4933
I've found a solution to Fermat's Last Theorem but I see I've run out of room o



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Bash $VAR expansion escapes the dollar instead of expanding
  2011-03-22 13:51 [gentoo-user] Bash $VAR expansion escapes the dollar instead of expanding felix
@ 2011-03-23 14:55 ` Willie Wong
  2011-03-23 16:01   ` felix
  0 siblings, 1 reply; 6+ messages in thread
From: Willie Wong @ 2011-03-23 14:55 UTC (permalink / raw
  To: gentoo-user

On Tue, Mar 22, 2011 at 06:51:54AM -0700, felix@crowfix.com wrote:
> I have an env var, WWW=/home/www/felix, which I have always used with
> tab completion without problems.
> 
>     cd $WWW/ht<tab>ph<tab>20110318
> 
> would expand in steps
> 
>     cd /home/www/felix/htdocs/
>     cd /home/www/felix/htdocs/photos/
>     cd /home/www/felix/htdocs/photos/20110318
> 
> But some recent bash upgrade has scuppered this.  <tab> no longer
> expands the $WWW; instead, it escapes the $, adds a space at the end,
> and thinks itself clever.
> 
>     cd \$WWW/ht ph
> 
> which does me no good.
> 
> I'll be danged if I can figure out any google-fu to search for this,
> and 'bash help'  and 'info bash' have done me no good either.
> 
> I do not know which specific bash upgrade changed this, since I don't
> have very many of these env vars I used similarly.  The current "bash
> --version" is 4.2.8(2)-release, gentoo version is app-shells/bash-4.2_p8.

A possible culprit maybe the bash-completion package. Have you updated
that recently?

W
-- 
Willie W. Wong                                     wwong@math.princeton.edu
Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire 
         et vice versa   ~~~  I. Newton



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Bash $VAR expansion escapes the dollar instead of expanding
  2011-03-23 14:55 ` Willie Wong
@ 2011-03-23 16:01   ` felix
  2011-03-23 19:33     ` Etaoin Shrdlu
  0 siblings, 1 reply; 6+ messages in thread
From: felix @ 2011-03-23 16:01 UTC (permalink / raw
  To: gentoo-user

On Wed, Mar 23, 2011 at 10:55:05AM -0400, Willie Wong wrote:

> A possible culprit maybe the bash-completion package. Have you updated
> that recently?

I haven't had bash-completion installed for years.  I forget now what
I didn't like about it, but it's not in the picture now.

-- 
            ... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
     Felix Finch: scarecrow repairman & rocket surgeon / felix@crowfix.com
  GPG = E987 4493 C860 246C 3B1E  6477 7838 76E9 182E 8151 ITAR license #4933
I've found a solution to Fermat's Last Theorem but I see I've run out of room o



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Bash $VAR expansion escapes the dollar instead of expanding
  2011-03-23 16:01   ` felix
@ 2011-03-23 19:33     ` Etaoin Shrdlu
  2011-03-23 20:57       ` felix
  2011-03-23 21:07       ` felix
  0 siblings, 2 replies; 6+ messages in thread
From: Etaoin Shrdlu @ 2011-03-23 19:33 UTC (permalink / raw
  To: gentoo-user

On Wed, 23 Mar 2011 09:01:15 -0700
felix@crowfix.com wrote:

> On Wed, Mar 23, 2011 at 10:55:05AM -0400, Willie Wong wrote:
> 
> > A possible culprit maybe the bash-completion package. Have you updated
> > that recently?
> 
> I haven't had bash-completion installed for years.  I forget now what
> I didn't like about it, but it's not in the picture now.

It seems to have been reported:

http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00274.html




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Bash $VAR expansion escapes the dollar instead of expanding
  2011-03-23 19:33     ` Etaoin Shrdlu
@ 2011-03-23 20:57       ` felix
  2011-03-23 21:07       ` felix
  1 sibling, 0 replies; 6+ messages in thread
From: felix @ 2011-03-23 20:57 UTC (permalink / raw
  To: gentoo-user

On Wed, Mar 23, 2011 at 07:33:40PM +0000, Etaoin Shrdlu wrote:

> It seems to have been reported:
> 
> http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00274.html

Your google-fu is strong.  I bow in your general direction :-)

-- 
            ... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
     Felix Finch: scarecrow repairman & rocket surgeon / felix@crowfix.com
  GPG = E987 4493 C860 246C 3B1E  6477 7838 76E9 182E 8151 ITAR license #4933
I've found a solution to Fermat's Last Theorem but I see I've run out of room o



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Bash $VAR expansion escapes the dollar instead of expanding
  2011-03-23 19:33     ` Etaoin Shrdlu
  2011-03-23 20:57       ` felix
@ 2011-03-23 21:07       ` felix
  1 sibling, 0 replies; 6+ messages in thread
From: felix @ 2011-03-23 21:07 UTC (permalink / raw
  To: gentoo-user

On Wed, Mar 23, 2011 at 07:33:40PM +0000, Etaoin Shrdlu wrote:

> It seems to have been reported:
> 
> http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00274.html

There is one useful note in that thread.  ESC ctrl-e gets rid of the
backslash, and if you want to keep the $VAR as $VAR, backspace over
the terminal space and continue.  Or you can ESC ctrl-e again, and
convert the $VAR to its value, so you won't need to repeat the single
ESC ctrl-e for each further <tab>.  A tolerable workaround for now.

-- 
            ... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
     Felix Finch: scarecrow repairman & rocket surgeon / felix@crowfix.com
  GPG = E987 4493 C860 246C 3B1E  6477 7838 76E9 182E 8151 ITAR license #4933
I've found a solution to Fermat's Last Theorem but I see I've run out of room o



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-03-23 21:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-22 13:51 [gentoo-user] Bash $VAR expansion escapes the dollar instead of expanding felix
2011-03-23 14:55 ` Willie Wong
2011-03-23 16:01   ` felix
2011-03-23 19:33     ` Etaoin Shrdlu
2011-03-23 20:57       ` felix
2011-03-23 21:07       ` felix

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox