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

Bug 564570

Summary: app-shells/bash-completion: eselect bashcomp doesn’t activate bash completion
Product: Gentoo Linux Reporter: dtr <presentmeaninvite>
Component: Current packagesAssignee: Michał Górny <mgorny>
Status: RESOLVED INVALID    
Severity: normal CC: eselect, monsieurp
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description dtr 2015-10-31 14:39:05 UTC
$ eselect bashcomp list	

shows that all the possible completions should be enabled: http://sprunge.us/ShdY
In fact, however, only those that have symlinks in /etc/bash_completion.d/ – in my case it’s ‘base’, ‘gentoo-style-init’ and ‘man’ – and though two of those symlinks seem to be broken http://i.imgur.com/5H5C51Z.png though, their completions work flawlessly. I can autocomplete man command or any script in /etc/init.d/ without problems and pressing TAB after ls puts the dirs in completion. 
I’ve tried to track how the files in /usr/share/bash-completion/completions become sourced and got the following chain:
Code:	

/etc/bash/bashrc → /etc/bash/bashrc.d/bash_completion.sh → /usr/share/bash-completion/bash_completion

which sources all files under /etc/bash_completion.d/. And it’s supposed to be eselect who must populate /etc/bash_completion.d/ with proper symlinks.

/etc/bash/bashrc is sourced by every shell, I confirmed it by exporting a variable there – it appeared in the environment of an instantly spawned terminal. I’ve checked this chain, it doesn’t fail.  By the way, sourcing completion files from /usr/sahre/bash-completion/completions/ manually makes TAB work for them.


app-shells/bash-completion 2.1_p20141224
app-shells/bash 4.3_p39
app-admin/eselect 1.4.4
Comment 1 dtr 2015-11-04 05:15:27 UTC
To be clear, the system was rebuilt after the bashcomp files migration, and eselect should work since no old files left:

# find /usr/share/bash-completion -maxdepth 1 -type f '!' -name 'bash_completion' -exec emerge -1av {} +
# 

But it doesn’t.
Comment 2 Ulrich Müller gentoo-dev 2015-11-04 06:19:39 UTC
Reassigning to maintainer of app-eselect/eselect-bashcomp.
Comment 3 dtr 2015-11-04 06:23:04 UTC
(In reply to Ulrich Müller from comment #2)
> Reassigning to maintainer of app-eselect/eselect-bashcomp.

Why? eselect-bashcomp was removed on upgrade yet several month ago. And it can’t be present together with modern bash-completion on the same system at the same time.
Comment 4 dtr 2015-11-04 06:26:21 UTC
Seems like the problem was in eselect 1.4.4. 1.4.5 switches them fine.
Comment 5 Ulrich Müller gentoo-dev 2015-11-04 07:26:02 UTC
(In reply to dtr from comment #3)
> > Reassigning to maintainer of app-eselect/eselect-bashcomp.
> 
> Why? eselect-bashcomp was removed on upgrade yet several month ago. And it
> can’t be present together with modern bash-completion on the same system at
> the same time.

Right, the module is in app-shells/bash-completion now. Same maintainer though. :)


(In reply to dtr from comment #4)
> Seems like the problem was in eselect 1.4.4. 1.4.5 switches them fine.

I cannot imagine how this could make any difference here. The only relevant change from 1.4.4 to 1.4.5 is removal of the binutils module.

$ git log --oneline eselect-1.4.4..eselect-1.4.5
ae8bde4 Update version to 1.4.5.
7f50ddd Update for automake-1.15.
f39abff Update NEWS.
f02e79a Remove binutils module.
b88d19c Fix typos in documentation.
Comment 6 dtr 2015-11-04 07:28:42 UTC
(In reply to Ulrich Müller from comment #5)
> (In reply to dtr from comment #3)
> > > Reassigning to maintainer of app-eselect/eselect-bashcomp.
> > 
> > Why? eselect-bashcomp was removed on upgrade yet several month ago. And it
> > can’t be present together with modern bash-completion on the same system at
> > the same time.
> 
> Right, the module is in app-shells/bash-completion now. Same maintainer
> though. :)
> 
> 
> (In reply to dtr from comment #4)
> > Seems like the problem was in eselect 1.4.4. 1.4.5 switches them fine.
> 
> I cannot imagine how this could make any difference here. The only relevant
> change from 1.4.4 to 1.4.5 is removal of the binutils module.
> 
> $ git log --oneline eselect-1.4.4..eselect-1.4.5
> ae8bde4 Update version to 1.4.5.
> 7f50ddd Update for automake-1.15.
> f39abff Update NEWS.
> f02e79a Remove binutils module.
> b88d19c Fix typos in documentation.

Maybe I just forgot to restart the shells because they are in tmux.