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
It's a feature.
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).
This is weird. Which version of bash-completion are you using (with -r* part), exactly?
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
(You may want to reopen this so that it doesn't get lost.)
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.