Bug 237 - bash adds a \ in front of $var when completing
Summary: bash adds a \ in front of $var when completing
Status: RESOLVED OLD
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: i586 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Shlomi Fish
QA Contact:
URL:
Whiteboard: MGA2TOO
Keywords: UPSTREAM
Depends on:
Blocks:
 
Reported: 2011-02-28 13:51 CET by Jerome Quelin
Modified: 2015-04-19 14:55 CEST (History)
4 users (show)

See Also:
Source RPM: bash-4.2
CVE:
Status comment:


Attachments

Description Jerome Quelin 2011-02-28 13:51:26 CET
$ cpan=/home/cpan
$ cp $cpan/<tab>
authors  modules  RECENT   
$ cp \$cpan/

note that bash-complete does indeed list the content of $cpan, but then copies a new line with a \ before the $cpan variable.

Reproducible: 

Steps to Reproduce:
Comment 1 Ahmad Samir 2011-02-28 19:23:41 CET
Looks like a change in bash, i.e. I uninstalled bash-completion altogether and got the same behaviour:
$ cp $HOME/<TAB>

$ cp \$HOME/


reverting to bash-4.1 brings the old/expected behaviour back.

Source RPM: (none) => bash

Comment 2 Ahmad Samir 2011-02-28 20:31:03 CET
Upstream change in behaviour, see http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00274.html

CC: (none) => ahmadsamir3891

Ahmad Samir 2011-02-28 20:31:10 CET

Source RPM: bash => bash-4.2

Comment 3 Ahmad Samir 2011-02-28 22:46:36 CET
Sorry, forgot to add, we'll have to wait for upstream's decision on this.
Ahmad Samir 2011-03-08 19:39:18 CET

Summary: bash completion adds a \ in front of $var when completing => bash adds a \ in front of $var when completing

Comment 4 Jerome Quelin 2011-04-12 16:27:25 CEST
upstream discussion vanished (dead link in comment 2 above), any news?
Comment 5 Ahmad Samir 2011-04-12 17:32:29 CEST
Looks like the archives of February and March have vanished somehow... unfortunately I am not subscribed to that ML (but if there's anything new, I guess the thread will be revived).

I checked it regularly and no news from upstream after the "I'll think about how to handle it" from upstream. (Also nothing new in Fedora http://pkgs.fedoraproject.org/gitweb/?p=bash.git regarding this issue).
Comment 6 Ahmad Samir 2011-04-22 20:36:43 CEST
FYI, looks like the upstream ML archives have been restored (no resolution for this bug yet, though).
Thierry Vignaud 2011-04-29 17:53:05 CEST

CC: (none) => thierry.vignaud

Comment 7 Jari S 2011-05-20 15:50:36 CEST
Looks like they found a solution https://qa.mandriva.com/show_bug.cgi?id=61635#c9

CC: (none) => lihamakaroonilaatikko

Comment 8 Ahmad Samir 2011-05-20 21:05:14 CEST
(In reply to comment #7)
> Looks like they found a solution
> https://qa.mandriva.com/show_bug.cgi?id=61635#c9

No, that's a totally different issue/bug.
Comment 9 Jari S 2011-05-21 06:07:54 CEST
Ok. I'll make new bug for it.
Comment 10 Ahmad Samir 2011-05-21 06:14:18 CEST
(In reply to comment #9)
> Ok. I'll make new bug for it.

But it'll be closed as invalid, since Mageia doesn't package Adobe Reader....
Comment 11 Jari S 2011-05-21 06:18:33 CEST
Yeah, I figured that out after finding that file causing the problem was not from any rpm package.
Comment 13 Ahmad Samir 2011-05-29 01:18:57 CEST
Upstream has a patch: http://lists.gnu.org/archive/html/bug-bash/2011-03/msg00235.html

it can't be included ATM as a) we're in freeze and b) upstream doesn't think it's "the 90% solution".
(just in case you're interested in patch bash locally).
Comment 14 Marja Van Waes 2011-10-02 21:38:13 CEST
Upstream is still working on it

http://lists.gnu.org/archive/html/bug-bash/2011-09/msg00007.html

And some users are happy with the tested patch

http://lists.gnu.org/archive/html/bug-bash/2011-09/msg00046.html

CC: (none) => m.van.waes

Marja Van Waes 2011-10-23 16:56:44 CEST

Keywords: (none) => UPSTREAM
Assignee: bugsquad => shlomif

Comment 15 Jerome Quelin 2012-01-10 14:00:15 CET
any news?
Comment 16 Shlomi Fish 2012-01-10 16:23:17 CET
(In reply to comment #15)
> any news?

Our version of bash is the latest one, and it's not fixed there in upstream. Either we wait or we apply an ad-hoc patch that fixes the problem. Can anyone recommend anything?

Regards,

-- Shlomi Fish
Comment 17 Marja Van Waes 2012-04-20 08:08:27 CEST
Upstream seems to have a good fix now:

http://lists.gnu.org/archive/html/bug-bash/2012-03/msg00023.html

Has it not yet been included, or do I misunderstand?:

http://git.savannah.gnu.org/cgit/bash.git/?h=direxpand

@ Shlomi

Since no one recommended anything here after you asked for it three months ago, if you'd still like a recommendation: maybe try on the Mageia-dev ml?
Comment 18 Marja Van Waes 2012-05-26 13:08:05 CEST
Hi,

This bug was filed against cauldron, but we do not have cauldron at the moment.

Please report whether this bug is still valid for Mageia 2.

Thanks :)

Cheers,
marja

Keywords: (none) => NEEDINFO

Comment 19 Shlomi Fish 2012-05-26 17:59:43 CEST
In Mageia 2 too.

Keywords: NEEDINFO => (none)
Version: Cauldron => 2

Marja Van Waes 2012-05-28 18:22:02 CEST

Version: 2 => Cauldron
Whiteboard: (none) => MGA2TOO

Comment 20 Shlomi Fish 2012-11-29 10:41:50 CET
Hi all,

as noted here:

http://askubuntu.com/questions/41891/bash-auto-complete-for-environment-variables

This can be fixed by doing «shopt -s direxpand», which makes it expand directories again. You can put it in .bashrc .

Since there's an easy workaround for it, can we close this bug?

Regards,

-- Shlomi Fish
Comment 21 Marja Van Waes 2015-04-19 14:55:25 CEST
Sorry, but this bug saw no action since over 2 yrs ago. 
No cauldron package has stayed the same since then.

Closing as OLD

Please reopen if this report is still valid for _current_ cauldron and/or fully
updated Mageia 4

Status: NEW => RESOLVED
Resolution: (none) => OLD


Note You need to log in before you can comment on or make changes to this bug.