Bug 1017891 - Bash-Completion Only Completes Files & Folders in Current Directory
Summary: Bash-Completion Only Completes Files & Folders in Current Directory
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: bash-completion
Version: 20
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Ville Skyttä
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-10 17:25 UTC by Redoubts
Modified: 2013-10-15 04:17 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-15 04:17:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


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