Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 525198

Summary: app-shells/bash-completion-2.1-r2 breaks completion after sudo
Product: Gentoo Linux Reporter: sluidfoe
Component: Current packagesAssignee: Michał Górny <mgorny>
Status: RESOLVED TEST-REQUEST    
Severity: normal CC: admwiggin, shell-tools
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description sluidfoe 2014-10-12 21:16:21 UTC
With bash-completion-1.3-r2, completion works after "sudo," e.g. sudo <TAB><TAB> will suggest all commands available.
Similarly, "sudo emerge --sy<TAB>" will complete to "sudo emerge --sync"

With bash-completion-2.1-r2, there is no command completion after "sudo," e.g. sudo <TAB><TAB> will suggest all files in the current directory.
Attempting "sudo emerge --sy<TAB>" will neither complete nor suggest anything.

Reproducible: Always

Steps to reproduce:
1. Type "sudo emerge --sy<TAB>

Actual Result:
No completion occurs

Expected Result:
Completion to "sudo emerge --sync"
Comment 1 Tianon 2014-12-05 23:53:20 UTC
I'm seeing something similar, but I think it's specific to "emerge", not "sudo" (in my case, anyhow).  If I do "sudo docker t<tab>", I get completions, but emerge offers nothing no matter the arguments.  On top of that, plain "emerge app-<tab>" pulls up nothing, which makes me think this is a gentoo-bashcomp issue, not necessarily a "sudo" issue.

I'm on app-shells/bash-completion-2.1-r2 (and app-shells/gentoo-bashcomp-20121024).

Perhaps the bump mgorny did for gentoo-bashcomp-20140911 to add "proper bash-completion autoloading support" is what's missing? :)  I've verified that installing app-shells/gentoo-bashcomp-20140911 does work as expected here.

(and thus, this bug becomes a justification for bug 531178)
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-07-02 22:08:26 UTC
It seems to work for me with 2.7. Feel free to reopen if you can still reproduce the problem.