Bug 831004

Summary: Tab-complete will not complete core file name.
Product: [Fedora] Fedora Reporter: Ben Greear <greearb>
Component: bash-completionAssignee: Ville Skyttä <ville.skytta>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: sheltren, ville.skytta
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-12 15:56:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ben Greear 2012-06-11 23:35:05 UTC
Description of problem:

I have a core called: core_0.old

If I run: gdb foo-server core_0.ol[tab]
it will not complete.  This used to work in
previous releases of Fedora.  It seems the tab-completion
got too smart and broke some things...

Version-Release number of selected component (if applicable):

7.4.50.20120120-42.fc17

How reproducible:

Always


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


Expected results:


Additional info:

Comment 1 Ville Skyttä 2012-06-12 15:56:12 UTC
This is intentional, only core and core.<PID> files are now completed in this scenario.  If you disagree with bash-completions' filename suggestions, use Alt+/ instead of tab to complete on all filenames.

Comment 2 Ben Greear 2012-06-12 16:18:22 UTC
Is there any way to disable this mis-feature and just let tab work like it used to work?  I've been doing tab-complete for years and have no interest in training my finders to use some Alt combination that is much more difficult to type.

Comment 3 Ville Skyttä 2012-06-12 19:48:49 UTC
Some things you may want to look into:

rpm -e bash-completion

shopt -u progcomp # in bashrc, see /etc/profile.d/bash_completion.sh

complete -F _minimal gdb # in bashrc

replace the last COMPREPLY+= line plus its continuation in /usr/share/bash-completion/completions/gdb with _filedir. This will be overwritten on bash-completion upgrades though.

The "some Alt combination" is what readline binds complete-filename by default. I suppose you could bind it to some other key/combination. Never tried that myself, see the bash man page for more info.