Bug 128791

Summary: Context-sensitive completion in bash is evil
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Federico Mena Quintero <federico>
Component: BasesystemAssignee: Dr. Werner Fink <werner>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: RC 4   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: New /etc/profile.d/complete.bash for better unzip support

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