This is my first post here, so please point out if something is wrong.
I have an idea about the whole shell completion packaging. The following is an example of bash, other shells are similar.
- Starting from the build section, it is of course quite inappropriate for the maintainers to manually add each shell completion package, so there should be such a macro that automatically creates the corresponding shell completion package when it detects that this package contains the shell completion. Such an approach would not have a huge impact on the existing maintenance work.
- When a user installs a package, if the user has already installed the
bash-completion
package that we already have, then it means that he needs shell completion, then add it to the transaction. - If the user does not have
bash-completion
installed at the beginning and installs it later, we should add all the shell completion packages from all currently installed packages to the transaction. - When the user uninstalls
bash-completion
, all shell completion packages depend on it, so it can be handled properly as well.
Overall, there are only two changes needed, one is to add the macros and the other is to be able to add all shell completions to the transaction when installing bash-completion
.
The above are just my thoughts, not verified for technical feasibility based on existing rpm functionality, and a lot of them come from Alpine Linux, whose foolproof design of automatically splitting a piece of software into different packages I think is great.
I know there will be another comment about “effect” and “cost”. For “cost”, this is the way I can think of to have the least cost; as for “effect”, the fact is that the only effect it has is to make things make more logical sense, and I’m committed to making everything make logical sense.
Lastly, this isn’t a formal request and I know that my ideas aren’t going to become reality based on the principle that the vast majority of people are “lazy”, so I’m just sharing my thoughts to the community. This is not a place for dictators, and I’m not a dictator, my sharing won’t change anything, so please don’t get stressed and act weird.