Install shell completion support system-wide

- Supported shells (for system-wide completion) are bash, fish, and zsh;
  procs can also generate completions for elvish and powershell.

https://github.com/dalance/procs/tree/v0.14.1#shell-completion
epel9
Benjamin A. Beasley 1 year ago
parent fbaae6aaa3
commit 11486b083e

@ -48,6 +48,9 @@ License: Apache-2.0 AND BSD-3-Clause AND MIT AND MPL-2.0 AND Unicode-DFS-
%doc CHANGELOG.md
%doc README.md
%{_bindir}/procs
%{bash_completions_dir}/procs.bash
%{fish_completions_dir}/procs.fish
%{zsh_completions_dir}/_procs
%prep
%autosetup -n %{crate}-%{version} -p1
@ -64,6 +67,15 @@ License: Apache-2.0 AND BSD-3-Clause AND MIT AND MPL-2.0 AND Unicode-DFS-
%install
%cargo_install
# generate and install shell completions
target/rpm/procs --gen-completion-out bash > procs.bash
target/rpm/procs --gen-completion-out fish > procs.fish
target/rpm/procs --gen-completion-out zsh > _procs
install -Dpm 0644 procs.bash -t %{buildroot}/%{bash_completions_dir}
install -Dpm 0644 procs.fish -t %{buildroot}/%{fish_completions_dir}
install -Dpm 0644 _procs -t %{buildroot}/%{zsh_completions_dir}
%if %{with check}
%check
%cargo_test

Loading…
Cancel
Save