As far as I can tell, Gentoo currently has (almost) all the shell magic to automatically support bash completion once it has been emerged. /etc/profile sources /etc/profile.d/*.sh However, in both bash-completion-20050121-r10 and -20060301 there's /etc/profile.d/bash-completion, which either has to be renamed manually or sourced in .bashrc kinda like '[ -f /etc/profile.d/bash-completion ] && . /etc/profile.d/bash-completion' Wouldn't it be easier to just automatically install the file with the 'correct' name so that once you emerge bash-completion it works out of the box? It took me quite some time to find out why it did not :-)
this is done on purpose ... packages should not install .sh files into /etc/profile.d/
(In reply to comment #1) > this is done on purpose ... packages should not install .sh files into > /etc/profile.d/ > At first, I wanted to recommend at least an einfo in the ebuild. After checking, I realized that it already exists. I just never noticed it because gentoo-bashcomp installs *after* bash-completion. My fault :)
*** Bug 142055 has been marked as a duplicate of this bug. ***
I don't get this. Why avoid putting .sh files in /etc/profile.d? Why have it at all if it's not going to be used? May as well put it in /etc/bash if it's going to be ignored in /etc/profile.d. Isn't the point of having /etc/profile.d that it's a way to have ebuilds update the user environment automagically as required by the functionality that they provide? In theory, if I've emerged bash completion, doesn't that mean I want it?
it's an opt-in system, not an opt-out
(In reply to comment #5) > it's an opt-in system, not an opt-out > That's why it's not installed (emerged) by default. I set a use flag, because I want a feature - opt-in. I emerge a package, because I want it - opt-in. Why do I have to double-opt-in on that package? And while we're at it, why does it install gentoo-bashcomp without even giving me a chance to opt-out? Having rules to follow is fine with me, but with this particular package, I just don't get them