Bug 1017891 - Bash-Completion Only Completes Files & Folders in Current Directory
Bash-Completion Only Completes Files & Folders in Current Directory
Product: Fedora
Classification: Fedora
Component: bash-completion (Show other bugs)
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Ville Skyttä
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-10-10 13:25 EDT by Redoubts
Modified: 2013-10-15 00:17 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-10-15 00:17:50 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Redoubts 2013-10-10 13:25:54 EDT
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):

How reproducible:

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 08:19:59 EDT
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 11:07:12 EDT
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 17:11:16 EDT
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 00:17:50 EDT
You got me; it looks like I carelessly blew away the defaults from my bashrc.

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