tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Question about bash completion directory



iquiw <iku.iwasa%gmail.com@localhost> writes:

> Sorry if this mailing list is not proper one.

It is the right list.

> I maintain some pkgsrc-wip packages and wonder which directory should
> be used to install bash completion scripts.
> In pkgsrc, there are at least 4 directories where some packages use to
> install bash completion scripts.
>
> (a) /usr/pkg/share/bash-completion/completions
> (b) /usr/pkg/share/bash-completion.d
> (c) /usr/pkg/share/bash_completion.d
> (d) /usr/pkg/etc/bash_completion.d
>
> (a) is most widely (over 20) used one. As of now, I'm using this.
> (b) is used by 3 packages. audio/lilv, net/youtube-dl and textproc/jo.
> (c) is used by 3 packages. benchmarks/phoronix-test-suite,
> chat/ejabberd and sysutils/etckeeper.
> (d) seems to be used by lang/rust only ("cargo").
>
> Problem of (a) is that the directory is used by shells/bash-completion
> package also.
> If shells/bash-completion adds new files, conflict may happen.
> (b) and (c) are not loaded from
> /usr/pkg/share/bash-completion/bash_completion script by default.
> So I think (d) could be the right choice, but not widely used now.
>
> Which directory should be used?

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 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.

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.


Home | Main Index | Thread Index | Old Index