Gentoo Archives: gentoo-user

From: Willie Wong <wwong@××××××××××××××.edu>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Bash $VAR expansion escapes the dollar instead of expanding
Date: Wed, 23 Mar 2011 14:56:34
Message-Id: 20110323145505.GA16288@math.princeton.edu
In Reply to: [gentoo-user] Bash $VAR expansion escapes the dollar instead of expanding by felix@crowfix.com
1 On Tue, Mar 22, 2011 at 06:51:54AM -0700, felix@×××××××.com wrote:
2 > I have an env var, WWW=/home/www/felix, which I have always used with
3 > tab completion without problems.
4 >
5 > cd $WWW/ht<tab>ph<tab>20110318
6 >
7 > would expand in steps
8 >
9 > cd /home/www/felix/htdocs/
10 > cd /home/www/felix/htdocs/photos/
11 > cd /home/www/felix/htdocs/photos/20110318
12 >
13 > But some recent bash upgrade has scuppered this. <tab> no longer
14 > expands the $WWW; instead, it escapes the $, adds a space at the end,
15 > and thinks itself clever.
16 >
17 > cd \$WWW/ht ph
18 >
19 > which does me no good.
20 >
21 > I'll be danged if I can figure out any google-fu to search for this,
22 > and 'bash help' and 'info bash' have done me no good either.
23 >
24 > I do not know which specific bash upgrade changed this, since I don't
25 > have very many of these env vars I used similarly. The current "bash
26 > --version" is 4.2.8(2)-release, gentoo version is app-shells/bash-4.2_p8.
27
28 A possible culprit maybe the bash-completion package. Have you updated
29 that recently?
30
31 W
32 --
33 Willie W. Wong wwong@××××××××××××××.edu
34 Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire
35 et vice versa ~~~ I. Newton

Replies