Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 531386 - >=app-shells/bash-completion-2.1 automatically loads new completions
Summary: >=app-shells/bash-completion-2.1 automatically loads new completions
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michał Górny
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-02 00:19 UTC by Adrian
Modified: 2014-12-06 19:49 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian 2014-12-02 00:19:55 UTC
When no bash completions are enabled (via `eselect bashcomp`), the /usr/share/bash-completion/.pre file is never sourced. This means the autoloading magic is not enabled either.
However, enabling *any* bashcomp module via eselect causes the .pre file to be loaded, too, so the magic is there.

This is extremely confusing and not what one would expect.

Reproducible: Always
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-12-02 08:49:16 UTC
It's a feature.
Comment 2 Adrian 2014-12-02 10:43:25 UTC
It's not the autoloading itself this bug is about but the fact that I need to enable **some** completion to get this behaviour, which is a) not documented, b) not expected (why do I enable a random completion to get all of them).
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-12-02 10:59:34 UTC
This is weird. Which version of bash-completion are you using (with -r* part), exactly?
Comment 4 Adrian 2014-12-02 11:03:55 UTC
2.1-r2; it's a freshly installed system so there's no clutter from old versions etc.

I checked /etc/profile.d/bash-completion.sh and according the code there fits with what I noticed. the pre file is only loaded if there are other files to load
Comment 5 Michael Orlitzky gentoo-dev 2014-12-06 18:52:56 UTC
(You may want to reopen this so that it doesn't get lost.)
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-12-06 19:49:55 UTC
We don't really support autoloading prior to bash-completion-2.1-r90. In the earlier versions, you are required to enable all necessary completions via eselect.