Bug 1017891

Summary: Bash-Completion Only Completes Files & Folders in Current Directory
Product: [Fedora] Fedora Reporter: Redoubts <redoubts>
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: 20CC: ooprala, redoubts, rrakus, sheltren, ville.skytta
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-15 04:17:50 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:

Description Redoubts 2013-10-10 17:25:54 UTC
Description of problem:
In Fedora 20 Alpha, with Gnome 3.10 and otherwise stock,
bach-completion does not work as expected. Bash completion should provide hints to subcommands, such as update for yum, but it does not. It only provides hints for files and folders in your cwd.

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

How reproducible:
Always

Steps to Reproduce:

For example, type
$ yum up<tab>

and you will get no hints or command completion. Type
$ yum <tab>

And you will only see a list of files in the cwd. No suggestions or hints for subcommands.

Comment 1 Ville Skyttä 2013-10-14 12:19:59 UTC
Works fine for me in a Rawhide mock chroot, ditto in F-19. Do you have the bash-completion and yum packages installed? If yes, do a "set -x" in a fresh shell, do "yum up<TAB>" and attach the resulting output here.

Note also that if you install them from a shell window, depending exactly on what you just installed you'll need another shell or perhaps a relogin before programmable completions start to work.

Comment 2 Redoubts 2013-10-14 15:07:12 UTC
No response for the normal user, even after the set -x. 

Curiously, I switched to the root user, and tried this - and bash completion works as expected there. Here's the output from that: https://gist.github.com/Redoubts/817e3f6305b0d9d0b1d4#file-gistfile1-txt

It just won't function at all for 'normal' users, with or without 'sudo' prepended.

Comment 3 Ville Skyttä 2013-10-14 21:11:16 UTC
If there's no output for the set -x use case, then it means that bash-completion isn't loaded at all for that user. I suspect your user doesn't have quite the standard Fedora bash setup.

Does your normal user's ~/.bashrc source /etc/bashrc? Does its ~/.bash_profile source its ~/.bashrc?

Comment 4 Redoubts 2013-10-15 04:17:50 UTC
You got me; it looks like I carelessly blew away the defaults from my bashrc.