Bug 128791 - Context-sensitive completion in bash is evil
Summary: Context-sensitive completion in bash is evil
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: RC 4
Hardware: Other Other
: P5 - None : Normal
Target Milestone: ---
Assignee: Dr. Werner Fink
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-17 17:55 UTC by Federico Mena Quintero
Modified: 2005-11-09 11:23 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
New /etc/profile.d/complete.bash for better unzip support (7.30 KB, text/plain)
2005-11-07 14:34 UTC, Dr. Werner Fink
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Federico Mena Quintero 2005-10-17 17:55:54 UTC
I need to type "unzip -v VeryLongLongLongLongFileName.odp" to test something.

So I type "unzip -v Ver[Tab]", and nothing happens.

This is the fault of /etc/profile.d/completion.bash.
Comment 1 Dr. Werner Fink 2005-10-18 09:25:30 UTC
No it is not.  Zip files do have the extension .zip or .ZIP
but not .odp ... if you want to unzip an OpenOffice file do

       complete -r unzip

Btw: You may explain this the customers which _wants_ this.
The reason for writing this context-sensitive completion was
only driven by customers.
Comment 2 Federico Mena Quintero 2005-10-19 15:57:22 UTC
That's some hard-core shell-using customers ya got there!  I'd love to see the feature request for this :)

In any case, it would be better to prioritize the completions, and fall back to any filename that matches if no context-sensitive completions are possible.
Comment 3 Dr. Werner Fink 2005-10-19 16:01:45 UTC
Read from my lips: I've said no.
Comment 4 Dr. Werner Fink 2005-11-07 14:34:22 UTC
Created attachment 56586 [details]
New  /etc/profile.d/complete.bash for better unzip support

Please give this new complete.bash a try. This
version should find any ZIP or EXE for the
unzip command
Comment 5 Dr. Werner Fink 2005-11-07 14:34:55 UTC
Reopen for feedback
Comment 6 Dr. Werner Fink 2005-11-07 14:47:26 UTC
Added expert mode: If ~/.bash.expert is found no completeion at
all is sourced but the file ~/.bash.expert
Comment 7 Dr. Werner Fink 2005-11-07 14:58:25 UTC
See attachment herein
Comment 8 Dr. Werner Fink 2005-11-09 11:23:35 UTC
No feedback is good feedback