Bug 747642 - bash file completion does not work as expected
Summary: bash file completion does not work as expected
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: bash-completion
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ville Skyttä
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-20 15:19 UTC by Joachim Backes
Modified: 2011-10-20 16:42 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-20 16:42:40 UTC
Type: ---


Attachments (Terms of Use)

Description Joachim Backes 2011-10-20 15:19:12 UTC
Description of problem:

I have a directory (say ~/x), containing the files "Asturias.html" and "Schulmeister.ogg".

Going to this directory (cd ~/x). Then

ls S<tab> expands to ls Schulmeister.ogg. This is OK

firefox S<tab> does not expand S to Schulmeister.ogg. This seems to be wrong.

firefox A<tab> expands to Asturias.html. OK

eeeee S<tab> expands to eeeee Schulmeister.ogg though eeeee is an unknown cmd.

Version-Release number of selected component (if applicable):
bash-completion-1.3-6.fc16.noarch
bash-4.2.10-4.fc16.x86_64

How reproducible:
always.

Steps to Reproduce:
1.See description
2.
3.
  
Actual results:
See description

Expected results:
Correct filename completion

Additional info:
If trying the same in F15, bash expands the filenames as expected.

Comment 1 Ville Skyttä 2011-10-20 16:42:40 UTC
(In reply to comment #0)
> ls S<tab> expands to ls Schulmeister.ogg. This is OK

Yes, it makes sense to complete all files after a "ls".

> firefox S<tab> does not expand S to Schulmeister.ogg. This seems to be wrong.
> 
> firefox A<tab> expands to Asturias.html. OK

bash-completion completes only various different HTML file suffixes after "firefox".  I don't think opening *.ogg with Firefox is what people generally intend to do.  If you disagree with what bash-completion does to the firefox command completion, you can remove that particular completion with "complete -r firefox" in your ~/.bash_completion or use Alt+/ instead of Tab when completing which bypasses bash-completion.

> eeeee S<tab> expands to eeeee Schulmeister.ogg though eeeee is an unknown cmd.

bash-completion only affects completions that it explicitly installs completions for, and obviously eeeee is not one of them, so what you're getting for it is bash's default completion.

> If trying the same in F15, bash expands the filenames as expected.

bash-completion is not installed in F15 by default, but it is in F16.  If you dislike its effects, you can just remove the bash-completion package or disable it on per user basis with for example "shopt -u progcomp" in ~/.config/bash_completion


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