Thank you for the reply!
> I'm not entirely sure. There is a question about what upstream does,
> and practice on Linux. Arguably there should be some mk file in bash
> that sets a variable, or perhaps in some mk/defaults/ place, and
> packages should use that variable.
I just checked the upstream FAQ. (should have checked before asking though...)
https://github.com/scop/bash-completion#faq------------------------------------------------------------------------------
The recommended directory is completionsdir, which you can get with pkg-config --variable=completionsdir bash-completion. From this directory, completions are loaded on-demand based on invoked commands' names, so be sure to name your completion file accordingly, and to include (for example) symbolic links in case the file provides completions for more than one command.
------------------------------------------------------------------------------
On my NetBSD, the output of "pkg-config --variable=completionsdir bash-completion" is /usr/pkg/share/bash-completion/completions.
So (a) looks the right directory.
> I see the point of conflicts with bash-completion package, but I don't
> see how having the same name in different files (what would happen in
> the same situation but a different place) is good either.
I see. The latter is not better.
> It seems that where completion files are installed should be someplace
> bash looks by default, or we should decide that users should have to opt
> into this. But one decision, for all.
I think bash itself does not have default, "bash-completion" has some directories to load by default, including (a) and (d).
And (a) is the recommend directory of
"bash-completion".
I will continue to use /usr/pkg/share/bash-completion/completions, hope other packages will do same.
Thanks,
iku