-
Notifications
You must be signed in to change notification settings - Fork 392
Fix regression in install-data-hook, support sourcing bash_completion.d from /usr/share/ and move ours #1399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
It no longer matches bash_completion so it was not substituting for the actual compatdir due to a refactor. Follow-up for cdd8a15
This is related to the discussion at #1329 (comment). I don't think-
I'm not familiar with the recent movements in distributions, but which distributions are you referring to? For example, |
Sure, I've changed it to
For example in Debian we recently moved most program's own shell completion scripts from /etc/bash_completion.d/ to /usr/share/bash-completion/completions/ You can find a list of similar efforts at uapi-group/specifications#76 |
This doesn't seem to be the official decision led by the maintainers of Debian's base system (that covers the basic parts of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think one thing I should point out is that the /etc/bash_completion.d
is anyway for backward compatibility (although there is a subtlety as discussed in #1329 (comment)). Then, a naive question would be whether we should introduce incompatible changes in the code kept for backward compatibility (which doesn't seem to make sense at first glance). If it breaks the compatibility, we could also argue that compatdir
should rather be removed.
- To completely get rid of
/etc/bash_completion.d
, all the programs that provides completion scripts with the old API need to be updated or adjusted in the packaging stage. - If the change is only applied at the packaging stage of distributions (without updating the scripts to use the new API), the package maintainers can always adjust the location of the scripts (including
000_bash_completion_compat.bash
) by setting a system defaultBASH_COMPLETION_COMPAT_DIR
(or applying a patch tobash_completion
). - If an upstream project of a specific command has a chance to change the location of the default install location from
/etc/bash_completion.d
to another place, it should rather update its completion script to use the newer API and put it in/usr/share/bash-completion/completions
.- In this context, if the project author sets up the installation of the completion script using autoconf or cmake following our
README.md
, if we change the compatdir in pkg-config, the installation location should automatically be adjusted even if the project is not actively maintained. In this sense, changing the default location ofcompatdir
now still has some effects. A little concern is how widely our pkg-config settings are installed in the system in distributions.
- In this context, if the project author sets up the installation of the completion script using autoconf or cmake following our
Even if this PR doesn't have much benefits in the practical situations, I think I can accept the PR.
Yes, I mentioned them as separate and independent examples as I thought you were looking for more than one occurrence, sorry for the confusion |
In distributions we are in the process of moving data shipped by upstream projects to /usr/ and out of /etc/, as the latter is really meant to be for local changes, not for upstream projects to ship programs/data. Add support for sourcing compat scripts from /usr/share/bash-completion/compat/ together with /etc/bash_completion.d, and move 000_bash_completion_compat.bash to the former.
My intention here was to keep backward compatibility intact - the existing directory is still checked for scripts. Do you see any use case that would be broken by these changes? |
In distributions we are in the process of moving data shipped
by upstream projects to /usr/ and out of /etc/, as the latter
is really meant to be for local changes, not for upstream
projects to ship programs/data.
Add support for sourcing compat scripts from /usr/share/bash_completion.d/
together with /etc/bash_completion.d, and move 000_bash_completion_compat.bash
to the former.