[Bug 725657] New: bash completion $PWD wrong

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c0 Summary: bash completion $PWD wrong Classification: openSUSE Product: openSUSE 12.1 Version: Factory Platform: x86-64 OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: koenig@linux.de QAContact: qa@suse.de Found By: --- Blocker: --- # rpm -q bash bash-4.2-35.2.x86_64 typing echo $PWD/<TAB> "expands" to echo \$PWD/ ^ ^ ^ and does not expand $PWD to it's value as expected (and as in every bash up to opensuse 11.4). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c1 --- Comment #1 from Harald Koenig <koenig@linux.de> 2011-10-21 18:05:16 UTC --- update: I've tested my own plain bash-4.2.8 build on suse 11.4: same problem! so it's not the 12.1 completion stuff, but some problem new in bash-4.2 (my own bash-4.1.10 build does not show that behaviour, nor does bash-3*) I've reported that upstream to bug-bash@gnu.org with "bashbug" -- stay tuned... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c2 Harald Koenig <koenig@linux.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |werner@suse.com --- Comment #2 from Harald Koenig <koenig@linux.de> 2011-10-21 19:12:15 UTC --- (In reply to comment #1)
I've reported that upstream to bug-bash@gnu.org with "bashbug" -- stay tuned...
and I already got an answer from Chet Ramey: Yes. Look at the bug-bash list archives for extensive discussion on this topic. There will be several changes and fixes in the next bash release to address this and other completion issues. and later: If you read further in that thread, you'll find a message I sent out on 9/2 containing a patch that adds a `direxpand' option. The new option is intended to restore the bash-4.1 behavior of performing word expansion on variables in directory names when completing. It works pretty well; there are a couple of rough edges that will be worked out. Look for <4E612F5B.5040003@case.edu>. which is http://lists.gnu.org/archive/html/bug-bash/2011-09/msg00007.html with his patch http://lists.gnu.org/archive/html/bug-bash/2011-09/txtbfgKuDx2Eo.txt and shopt -s direxpand bash-4.2 again works fine like in the good old days -- hooray!!! <PLEASE> add that bash patch and "shopt -s direxpand" in the login setup for 12.1-final !!!!!!!!!!!!!!! </PLEASE> -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c zj jia <zjjia@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |zjjia@suse.com AssignedTo|bnc-team-screening@forge.pr |werner@suse.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c3 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |coolo@suse.com Resolution| |FIXED --- Comment #3 from Dr. Werner Fink <werner@suse.com> 2011-10-25 17:14:01 UTC --- Submit request id 89301 now if this will go in is not my decision (sigh!) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c4 --- Comment #4 from Bernhard Wiedemann <bwiedemann@suse.com> 2011-10-25 20:00:09 CEST --- This is an autogenerated message for OBS integration: This bug (725657) was mentioned in https://build.opensuse.org/request/show/89301 Factory / bash https://build.opensuse.org/request/show/89302 Factory / aaa_base -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c5 robert spitzenpfeil <madworm_de.novell@spitzenpfeil.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |madworm_de.novell@spitzenpf | |eil.org --- Comment #5 from robert spitzenpfeil <madworm_de.novell@spitzenpfeil.org> 2011-10-31 19:00:39 UTC --- I'm using tumbleweed. Since the last update I can't do this anymore: /some_scri<TAB> result: /some_script.sh It still works with an absolute path. Turns out the problem is "/etc/profile.d/complete.bash" (aaa_base-extras-12.1-126.1.i586) - If I downgrade to the 11.4 one, it works again. Running "shopt -u direxpand" in the 'flawed' bash shell makes it work again as well. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c6 Mark Gonnelly <mgonnelly@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mgonnelly@suse.com --- Comment #6 from Mark Gonnelly <mgonnelly@suse.com> 2011-10-31 19:31:11 UTC --- (In reply to comment #5)
I'm using tumbleweed.
mark@triona:~/Desktop> rpm -qa | grep bash bash-lang-4.2-118.1.noarch bash-4.2-118.1.x86_64 bash-doc-4.2-118.1.noarch I can confirm that tab completion of executables in the working directory is now broken. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c7 Jon Nelson <jnelson-suse@jamponi.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jnelson-suse@jamponi.net --- Comment #7 from Jon Nelson <jnelson-suse@jamponi.net> 2011-11-01 00:18:30 UTC --- Not just 'executables' but directories and files, too. Before: vim some_local_dir/s<tab> might expand to: vim some_local_dir/some_file.c but now expands to: vim /full/path/to/some_local_dir/some_file.c Ugh. Rather annoying, especially when long paths are involved. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c8 --- Comment #8 from Jon Nelson <jnelson-suse@jamponi.net> 2011-11-01 00:18:58 UTC --- Should this still be 'resolved / fixed' ? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c9 --- Comment #9 from Jon Nelson <jnelson-suse@jamponi.net> 2011-11-01 01:09:13 UTC --- Actually, even with: "shopt -u direxpand" I get an even weirder error. Example: mkdir foo touch foo/bar less foo/b<tab> results in: less foo/bbash: $1: unbound variable Tracking that down (by way of set -x): + test -n '' + (( quoted )) + _compreply_ + local 'IFS= ' + local s x + local -i o bash: $1: unbound variable ++ ppwd 5 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c10 Greg Kroah-Hartman <gregkh@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |gregkh@suse.com Resolution|FIXED | --- Comment #10 from Greg Kroah-Hartman <gregkh@suse.com> 2011-11-01 15:25:09 UTC --- ok, I can reproduce this here as well, the default should not have changed. Reopening. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c11 Rich Coe <rcoe@wi.rr.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rcoe@wi.rr.com --- Comment #11 from Rich Coe <rcoe@wi.rr.com> 2011-11-02 02:33:35 UTC --- I stumbled across this issue. 'shopt -u diexpand' fixed the issue for me. I cannot reproduce the 'unbound variable' issue. bash-4.2-38.3.x86_64 (opensuseFactory 12.1) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c12 --- Comment #12 from Bernhard Wiedemann <bwiedemann@suse.com> 2011-11-02 10:00:07 CET --- This is an autogenerated message for OBS integration: This bug (725657) was mentioned in https://build.opensuse.org/request/show/89909 Factory / bash -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c13 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED --- Comment #13 from Dr. Werner Fink <werner@suse.com> 2011-11-02 09:25:17 UTC --- Sorry Harald, I've disabled the patch -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|FIXED |WONTFIX -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c14 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |novell@pontohonk.de --- Comment #14 from Dr. Werner Fink <werner@suse.com> 2012-01-17 09:25:02 UTC --- *** Bug 736588 has been marked as a duplicate of this bug. *** http://bugzilla.novell.com/show_bug.cgi?id=736588 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c15 Lars Müller <lmuelle@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|WONTFIX | --- Comment #15 from Lars Müller <lmuelle@suse.com> 2012-02-26 14:59:31 CET --- It looks like this issue isn't fixed for openSUSE 12.1. See this thread http://lists.opensuse.org/opensuse-de/2012-02/msg00451.html lmuelle@hip:~> rpm -q bash bash-4.2-1.8.1.x86_64 lmuelle@hip:~> echo \$PWD/ $PWD/ While I typed 'echo $PWD/<TAB>' as Harald described with his initial comment. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c16 --- Comment #16 from Lars Müller <lmuelle@suse.com> 2012-02-26 15:12:28 CET --- The package change log explains why even after the merge of submit request https://build.opensuse.org/request/show/89301 we see the same issue. Cause https://build.opensuse.org/request/show/89909 reverts the change. As Werner has written in comment #13 he disabled the patch. You see this in the package change log too. Therefore the questions are: a) do we need better documentation (add this to the most annoying bugs of 12.1 for example)? b) Does this need more work to enhance the fix? I'm checking openSUSE Factory next. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c17 --- Comment #17 from Lars Müller <lmuelle@suse.com> 2012-02-26 15:36:54 CET --- Still the same with openSUSE 12.2 Milestone 0 (x86_64) VERSION = 12.2 CODENAME = Mantis zypper dup is running atm. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c18 --- Comment #18 from Harald Koenig <koenig@linux.de> 2012-02-26 14:48:11 UTC --- (In reply to comment #17)
Still the same with
openSUSE 12.2 Milestone 0 (x86_64) VERSION = 12.2 CODENAME = Mantis
zypper dup is running atm.
on all relevant systems I'm still using bash-4.1 as login shell (as /usr/local/bin/bash) which is not broken. I did not try to reply the /bin/bash in suse 12.1 with version 4.1 so far if there are any system scripts which might use 4.2-specific stuff ?! recently I've checked the official bash patcesh again (newest was bash42-020) but that issue is still not fixed after *one*year* :-(( maybe just step back to 4.1, or think about ash/zsh/dash/anynonbash ? just my 2 cents... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c19 --- Comment #19 from Lars Müller <lmuelle@suse.com> 2012-02-26 16:52:42 CET --- And also still the same issue with: openSUSE 12.2 Milestone 1 (x86_64) VERSION = 12.2 CODENAME = Mantis bash-4.2-46.3
From the package change log we know:
* Fr Nov 25 2011 werner@suse.de - Update bash 4.2 to patch level 20 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c20 --- Comment #20 from Dr. Werner Fink <werner@suse.com> 2012-02-27 09:52:40 UTC --- (In reply to comment #18) Harald? Do you know about the command bashbug? Please test out if the bug exists with no complete macros enabled. That is complete -r cd $HOME/bin<tab> and then run bashbug and report this upstream. Also report that the old patch from upstream may solve this specific bug but cause other an other bug. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c21 Sebastian Siebert <freespacer@gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |freespacer@gmx.de --- Comment #21 from Sebastian Siebert <freespacer@gmx.de> 2012-02-29 17:05:33 UTC --- Hi, I have looked at the "direxpand"-patch from the upstream. The patch has a small error that I have corrected this issue with a further patch. So I have reenabled it again. The "direxpand" feature should work now. Please test the updated bash from my home repo and give me a feedback. Thank you. openSUSE 12.1: http://download.opensuse.org/repositories/home:/Freespacer:/branches:/shells... openSUSE 11.4: http://download.opensuse.org/repositories/home:/Freespacer:/branches:/shells... Regards, Sebastian -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c22 --- Comment #22 from Lars Müller <lmuelle@suse.com> 2012-02-29 19:46:31 CET --- Created an attachment (id=478691) --> (http://bugzilla.novell.com/attachment.cgi?id=478691) Patch as Sebastian adden to his OBS project -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c23 --- Comment #23 from Lars Müller <lmuelle@suse.com> 2012-03-01 01:13:29 CET --- This is an manual generated message for OBS integration: This bug (725657) was mentioned in https://build.opensuse.org/request/show/107632 home:Freespacer:branches:shells / bash -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c24 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |NEEDINFO InfoProvider| |maintenance@opensuse.org --- Comment #24 from Dr. Werner Fink <werner@suse.com> 2012-03-06 09:54:15 UTC --- Use the correct patch found at http://git.savannah.gnu.org/cgit/bash.git/patch/?id=b3203139c0ad0bd9fa902d5e... solves the problem as well does not cause other bugs. For this an update is required -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c25 --- Comment #25 from Bernhard Wiedemann <bwiedemann@suse.com> 2012-03-06 11:00:10 CET --- This is an autogenerated message for OBS integration: This bug (725657) was mentioned in https://build.opensuse.org/request/show/108132 Factory / bash -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c26 --- Comment #26 from Bernhard Wiedemann <bwiedemann@suse.com> 2012-03-06 14:00:09 CET --- This is an autogenerated message for OBS integration: This bug (725657) was mentioned in https://build.opensuse.org/request/show/108163 Factory / bash https://build.opensuse.org/request/show/108164 Factory / bash -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c Jean Delvare <jdelvare@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- OS/Version|Other |openSUSE 12.1 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c27 Dirk Mueller <dmueller@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |REOPENED InfoProvider|maintenance@opensuse.org | Severity|Normal |Major --- Comment #27 from Dirk Mueller <dmueller@suse.com> 2012-03-13 13:29:59 CET --- Please submit as update for openSUSE 12.1 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c28 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |NEEDINFO InfoProvider| |dmueller@suse.com --- Comment #28 from Dr. Werner Fink <werner@suse.com> 2012-03-13 13:43:22 UTC --- (In reply to comment #27) See request 109111 *and* request 109108 as both fixes problems with bash completion. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c29 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |CLOSED InfoProvider|dmueller@suse.com | Resolution| |NORESPONSE --- Comment #29 from Dr. Werner Fink <werner@suse.com> 2012-03-15 13:56:44 UTC --- No response -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c30 --- Comment #30 from Swamp Workflow Management <swamp@suse.de> 2012-04-02 11:10:52 UTC --- openSUSE-RU-2012:0454-1: An update that has four recommended fixes can now be installed. Category: recommended (low) Bug References: 725657,732934,738501,752422 CVE References: Sources used: openSUSE 12.1 (src): aaa_base-12.1-534.113.1, bash-4.2-1.11.1 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c31 Ashwin G <ash25.icon@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |REOPENED CC| |ash25.icon@gmail.com Resolution|NORESPONSE | --- Comment #31 from Ashwin G <ash25.icon@gmail.com> 2012-10-01 23:14:38 UTC --- I observe the same issue with openSUSE 12.2 Just type: ls $PWD <Hit the Tab Key now> and it expands to: ls \$PWD/ The command now becomes invalid. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c32 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|Major |Normal --- Comment #32 from Dr. Werner Fink <werner@suse.com> 2012-10-02 06:38:26 UTC --- (In reply to comment #31) Just do complete -r . /etc/profile.d/complete.bash and report if the problem remains. If not the bug is not in the standard bash completion but in the package bash-completion. This because I'm not able to reproduce and the changes in package aaa_base as well as in tghe package bash are included: aaa_base: Tue Mar 6 2012 werner@suse.de - Fix some bash completion problems (bnc#738501) bash: Tue Mar 6 2012 werner@suse.de - Reenable patch for bnc#725657 with latest change from latest git repository of the patch. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c33 Ashwin G <ash25.icon@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- OS/Version|openSUSE 12.1 |openSUSE 12.2 --- Comment #33 from Ashwin G <ash25.icon@gmail.com> 2012-10-02 07:38:35 UTC --- I ran these 2 commands: complete -r . /etc/profile.d/complete.bash Now the '$' is not escaped, but the $PWD is not being replaced by the absolute path (may be this functionality comes from the bash-completion package). So should I raise a new bug for this ? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c34 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED CC| |christian.morales.vega@gmai | |l.com, vuntz@suse.com Resolution| |FIXED --- Comment #34 from Dr. Werner Fink <werner@suse.com> 2012-10-02 08:06:24 UTC --- Yes as the escape is done by the bash-completion package or one of the files below /usr/share/bash-completion/ or /etc/bash_completion.d/ but not from the bash its self nor from /etc/profile.de/complete.bash In fact in /etc/profile.de/complete.bash there is no complete command for ls but for e.g. cd and this works flawless. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c35 --- Comment #35 from Christoph Bartoschek <novell@pontohonk.de> 2012-10-02 08:11:31 UTC --- For me the behaviour with 12.2 is different but still buggy. I enter ls $HOME<Press the TAB key> this is expanded to "ls $HOME " without the quotation marks. Note the space after $HOME. The correct behaviour would be to expand $HOME to /home/bartosch/ and having the cursor after the expansion without a SPACE. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c36 --- Comment #36 from Ashwin G <ash25.icon@gmail.com> 2012-10-02 18:57:22 UTC --- Yes I observe the same behavior as Christoph B. I do not know about openSUSE 12.1, but at least in 11.4 - which I was using till last week, I never had this problem. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c37 Ashwin G <ash25.icon@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | --- Comment #37 from Ashwin G <ash25.icon@gmail.com> 2012-10-02 21:20:31 UTC --- Here is another reference which might be useful to the developers - please read comment 14: https://bugs.launchpad.net/ubuntu/+source/bash/+bug/778627 It seems to be fixed with the patch bash4.2-029. My bash version says: GNU bash, version 4.2.24(1)-release (x86_64-suse-linux-gnu) I'm marking this bug as REOPENED - since I'm not convinced this is the expected behavior with bash and variable expansion. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c38 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED --- Comment #38 from Dr. Werner Fink <werner@suse.com> 2012-10-04 07:12:12 UTC --- Would pelase stop this! The patch is already included in the update for openSUSE 12.2: see changelog: Tue Mar 6 2012 werner@suse.de - Reenable patch for bnc#725657 with latest change from latest git repository of the patch. This is in fact the patch bash4.2-029. AFAICS the bash 4.2.36 does it the same way. Beside this please hold in mind that I'm not responsible for the packages bash-completion, nor of any of the file below /etc/bash_completion.d/ nor for thefor the upstream behaviour of the current completion of the bash. Also there is no completion for the ls command in /etc/profile.d/completion.bash. That is just do a `complete -r' test out the default completion for the command ls and then run bashbug. On the other hand you may provide a useful complete shell macro for the ls command, see:
complete -r . /etc/profile.d/complete.bash complete -p | grep -E '[[:blank:]]cd' complete -o bashdefault -o default -o dirnames -o nospace -o plusdirs -F _cd_ cd complete -o bashdefault -o default -o dirnames -o nospace -o plusdirs -F _cd_ ls ls $PWD<TAB> ls /usr/src/werner/mandb/
as you can see, I'm currently working on an update of the package man. And be aware that the complete shell function _cd_ from /etc/profile.d/completion.bash is written for directory expansion only. Have a look on the shell function _cd_ in /etc/profile.d/completion.bash to see how programmable bash completion is working and please note that even with those verious distinctions of cases there is alway a usecase which you will miss. Beside this for interactive shell I prefere tcsh as here completion is done very easily and without the nightmare the high flexible but extrem fragile completion feature of the bash. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c39 --- Comment #39 from Ashwin G <ash25.icon@gmail.com> 2012-10-04 16:25:45 UTC --- Thanks Werner for the explanation. I understand it more of an upstream change in the behavior of the bash package which is causing all these features which have been working for couple of years to break. Using your suggestion for ls tab-completion, it works only if there is no '/' at the end. For example, I have an age-old Centos machine (Centos 4 I guess) which has no bash-completion package and it does the simple tab expansion of variables ending with a / at the end of the variable (which is quite the natural behavior you'd expect). ls $PWD/<TAB> ls $PWD/newdir<TAB> (Expands to absolute path) Also ls $PWD<TAB> (Just adds a space without expansion - again a naturally expected behavior) And I'm surprised this has just stopped working. In fact I tried the bash-4.2-1.8.1.x86_64.rpm from openSUSE 12.1 - and it exhibits a similar behavior as openSUSE 12.2 (I've uninstalled bash-completion - so it is the plain bash package I'm using). Then I switched to 11.4's bash-4.1-20.25.1.x86_64.rpm and there the feature works without any problems. Then I installed the latest bash-completion to go with this, and so far I've not found any problems. I understand I can switch to tcsh or any other powerful shell like zsh - but many of the Makefiles break in shells other than bash (even it's very close subset cousin dash for instance). I've written few minor additions to bash-completion in the past, but I dont remember much of it. I guess I should go ahead and find out how to get it working with the latest bash. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c40 --- Comment #40 from Dr. Werner Fink <werner@suse.com> 2012-10-05 07:24:11 UTC --- (In reply to comment #39) In the shell function _cd_() you will find in /etc/profile.d/complete.bash you could add the `ls' command behind the `mkdir' command, that is case "${1##*/}" in mkdir|ls) ;; ^^^^^^^^^^^^^^^^^^ cd|pushd) s="-S/" [[ "$c" =~ ^\..* ]] || let cdpath++ ;; *) s="-S/" esac and just retry. Only the file completion will not work fully as the _cd_() shell function was written for directory expansion and in history the ls file completion had never a problem. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=725657 https://bugzilla.novell.com/show_bug.cgi?id=725657#c41 --- Comment #41 from Bernhard Wiedemann <bwiedemann@suse.com> 2012-10-05 18:00:09 CEST --- This is an autogenerated message for OBS integration: This bug (725657) was mentioned in https://build.opensuse.org/request/show/137262 Factory / aaa_base -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com