/etc/bash_completion.d/ vs /usr/share/bash-completion/
On 06/17/2011 08:43 PM, Jesse Keating wrote:
> Both seem to be in use by various packages. Which one is thought to be
> "correct"? Should this be in the guidelines somewhere?
I'd say at the moment nothing besides bash-completion itself should be
installing files to /usr/share/bash-completion, and I'm not aware of any
package that does that. Can you point out some?
In its current default configuration, bash_completion does not load any
completions from that dir, it loads them from /etc/bash_completion.d.
bash-completion contains completions for many commands that may not be
installed and "enables" them with rpm triggers by symlinking things to
/etc/bash_completion.d to avoid loading stuff that will not be used.
Packages that install completions for commands that they ship themselves
need not jump through such hoops, they can simply drop their completions
Some of this will quite probably change with the next upstream release,
which will also add a pkgconfig file with which packages installing
completions can find out the dir to use like "pkg-config
--variable=completionsdir bash-completion". Loading files from
/etc/bash_completion.d will continue to be supported just like it is now
for backwards compatibility, but it is possible that some additional
rules (naming etc) how to install files to the path pointed to by the
pkgconfig snippet will be established. There will be documentation in
the bash-completion package how to do things the right way and I'll post
a heads up note here when the details have been figured out.
devel mailing list