Dne 24. 06. 22 v 21:26 Maxwell G napsal(a):
Hi everyone,
Currently, packaging shell completions is a bit of a hassle. You have to
memorize a bunch of long directory names (`%{_datadir}/bash-completion/
completions`, `%{_datadir}/fish/vendor_completions.d`, and `%{_datadir}/zsh/
site-functions`), and repeat them multiple times in the specfile. For some
reason, the bash completion directories are owned by filesystem, but zsh and
fish's shell completions directories are not. Therefore, every package needs
to copy
```
%files
[...]
%{_datadir}/bash-completion/completions/%{name}
%dir %{_datadir}/fish
%dir %{_datadir}/fish/vendor_completions.d
%{_datadir}/fish/vendor_completions.d/%{name}.fish
I think that in practice, owning just `%{_datadir}/fish` would be
enough, because the package one prepares probably won't have any
additional content in this directory apart from the
`%{_datadir}/fish/vendor_completions.d/%{name}.fish` file. But of
course, the more verbose version you used provides more control.
Vít