Bug 677446 - ls directory handling very different
Summary: ls directory handling very different
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: bash-completion
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ville Skyttä
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 692542 699047 701961 702329 703090 703259 703687 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-14 20:15 UTC by Orion Poplawski
Modified: 2018-04-11 16:54 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-02-14 21:15:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Orion Poplawski 2011-02-14 20:15:25 UTC
Description of problem:

With bash-completion-1.3-2.fc15.noarch completion with ls seems wrong.

ls /et<tab>

yields (_ for cursor location)

ls /etc _

I would expect:

ls /etc/_

Comment 1 Ville Skyttä 2011-02-14 20:55:44 UTC
Do you have Adobe Reader and its bash completion installed?  It is known to redefine bash-completion's _filedir function with an incompatible version, resulting in problems like the one you describe and more.

http://forums.adobe.com/thread/745833

If yes, the fix is either to remove the conflicting completion file altogether (usually /etc/bash_completion.d/acroread.sh), or to comment out the definition of _filedir in it (the one defined in bash-completion should be compatible I think), or to rename definition and uses of _filedir in it to something else.

Comment 2 Orion Poplawski 2011-02-14 21:15:27 UTC
Ah, that is indeed the case.  Commenting out the _filedir() definition in /etc/bash_completion.d/acroread.sh did the trick for me.  Thanks.

Comment 3 Ville Skyttä 2011-03-31 19:27:57 UTC
*** Bug 692542 has been marked as a duplicate of this bug. ***

Comment 4 Orion Poplawski 2011-04-22 21:47:46 UTC
*** Bug 699047 has been marked as a duplicate of this bug. ***

Comment 5 Ville Skyttä 2011-05-04 16:12:48 UTC
*** Bug 701961 has been marked as a duplicate of this bug. ***

Comment 6 James Heather 2011-05-04 23:21:53 UTC
Is the Adobe one taking precedence because it's alphabetically first? Would a better workaround (that could be put into bash completion without negative effects elsewhere) to put a symlink called '000' into bash_completion.d, pointing to the file with the real definition in it?

Comment 7 Ville Skyttä 2011-05-05 06:22:56 UTC
No, the problem is that acroread.sh is sourced after our _filedir has been defined in /etc/bash_completion (acroread.sh blindly overwrites it).

The workaround possibilities are to split our _filedir out of /etc/bash_completion into bash_completion.d and arrange so that it loads after acroread.sh's, keeping things as is but making our _filedir readonly (but that'd result in an error message on every interactive shell startup from which it isn't easy to find out what's wrong), or simply not loading acroread.sh at all.

The next upstream bash-completion version will most likely apply a "namespace" prefix to all our functions (not due to this issue, but for other reasons) which will make this issue go away.  That version is probably not that far away, and I'm not at all enthusiastic about adding ugly workarounds for something that's clearly a bug in a proprietary 3rd party package for which there exists alternatives included in Fedora that surely work just fine for the large majority of users.

Comment 8 Jeff Sheltren 2011-05-06 17:47:30 UTC
*** Bug 702329 has been marked as a duplicate of this bug. ***

Comment 9 Elad Alfassa 2011-05-09 10:02:37 UTC
*** Bug 703090 has been marked as a duplicate of this bug. ***

Comment 10 Jeff Sheltren 2011-05-09 19:03:46 UTC
*** Bug 703259 has been marked as a duplicate of this bug. ***

Comment 11 Fedora Update System 2011-05-10 21:46:58 UTC
bash-completion-1.3-4.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/bash-completion-1.3-4.fc15

Comment 12 Fedora Update System 2011-05-10 21:48:00 UTC
bash-completion-1.3-4.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/bash-completion-1.3-4.fc14

Comment 13 Ville Skyttä 2011-05-10 21:51:09 UTC
Those of you who have Adobe Reader installed, please revert its /etc/bash_completion.d/acroread.sh back to its original state, try the bash-completion 1.3-4 updates mentioned in previous comments, and post your feedback in bodhi.

Comment 14 Ville Skyttä 2011-05-11 05:59:55 UTC
*** Bug 703687 has been marked as a duplicate of this bug. ***

Comment 15 Ted Pavlic 2011-05-11 18:43:47 UTC
(In reply to comment #14)
> *** Bug 703687 has been marked as a duplicate of this bug. ***

I can verify that renaming _filedir (to _acroreadfiledir) throughout acroread.sh fixes the problem from bug 703687 as well (i.e., cp, mv, rm, ls, and others operate as they used to).

I am looking forward to the namespace changes in bash-completion 1.3-4. I would install the noarch RPM directly, but I have no idea how package management works on Fedora (I'm afraid installing my own RPM will prevent updating to the official version later, but maybe I'm paranoid). Hopefully the new package will get pushed to a repo soon.

Comment 16 James Heather 2011-05-11 19:03:12 UTC
1.3-4 is working for me.

Installing the noarch RPM directly won't cause any harm: it'll still get updated in the future. Yum doesn't care where things originally came from--it just installs any updates to packages that are currently installed, whether they got there via yum or directly.

  rpm -Uvh bash-completion-1.3-4.fc14.noarch.rpm

James

Comment 17 Ville Skyttä 2011-05-11 20:35:05 UTC
Thanks to everyone who tested the update, but please provide feedback _in bodhi_ (the updates system, after logging in there) as mentioned in comment 13; that'll help with getting the update released quicker - feedback here does not have that effect.

Comment 18 Fedora Update System 2011-05-19 04:55:59 UTC
bash-completion-1.3-4.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2011-05-25 03:05:07 UTC
bash-completion-1.3-4.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


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