diff --git a/bat.changes b/bat.changes index afd0c3b..5b7453e 100644 --- a/bat.changes +++ b/bat.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Nov 30 22:20:13 UTC 2022 - Filippo Bonazzi + +- Add shell completion packages +- Install manpage + ------------------------------------------------------------------- Fri Oct 14 01:15:46 UTC 2022 - William Brown diff --git a/bat.spec b/bat.spec index c511d0c..0615fc6 100644 --- a/bat.spec +++ b/bat.spec @@ -36,6 +36,33 @@ ExclusiveArch: %{rust_arches} A cat(1) clone which supports syntax highlighting for a large number of programming and markup languages. It has git integration and automatic paging. +%package bash-completion +Summary: Bash completion for %{name} +Requires: %{name} = %{version} +Supplements: (%{name} and bash-completion) +BuildArch: noarch + +%description bash-completion +Bash command line completion support for %{name}. + +%package fish-completion +Summary: Fish completion for %{name} +Requires: %{name} = %{version} +Supplements: (%{name} and fish) +BuildArch: noarch + +%description fish-completion +Fish command line completion support for %{name}. + +%package zsh-completion +Summary: Zsh completion for %{name} +Requires: %{name} = %{version} +Supplements: (%{name} and zsh) +BuildArch: noarch + +%description zsh-completion +Zsh command line completion support for %{name}. + %prep %setup -qa1 mkdir .cargo @@ -47,6 +74,12 @@ cp %{SOURCE2} .cargo/config %install install -D -m 0755 target/release/%{name} %{buildroot}%{_bindir}/%{name} +install -D -m 0644 $(find target/release/build -name "%{name}.1") "%{buildroot}/%{_mandir}/man1/%{name}.1" + +install -D -m 0644 $(find target/release/build -name "%{name}.bash") "%{buildroot}/%{_datadir}/bash-completion/completions/%{name}" +install -D -m 0644 $(find target/release/build -name "%{name}.fish") "%{buildroot}/%{_datadir}/fish/vendor_completions.d/%{name}.fish" +install -D -m 0644 $(find target/release/build -name "%{name}.zsh") "%{buildroot}/%{_datadir}/zsh/site-functions/_%{name}" + %if %{with check} %check %{cargo_test} @@ -56,5 +89,19 @@ install -D -m 0755 target/release/%{name} %{buildroot}%{_bindir}/%{name} %doc README.md CONTRIBUTING.md CHANGELOG.md %license LICENSE-MIT LICENSE-APACHE %{_bindir}/%{name} +%{_mandir}/man1/%{name}.1%{ext_man} + +%files bash-completion +%{_datadir}/bash-completion/completions/%{name} + +%files fish-completion +%dir %{_datadir}/fish +%dir %{_datadir}/fish/vendor_completions.d +%{_datadir}/fish/vendor_completions.d/%{name}.fish + +%files zsh-completion +%dir %{_datadir}/zsh +%dir %{_datadir}/zsh/site-functions +%{_datadir}/zsh/site-functions/_%{name} %changelog diff --git a/vendor.tar.xz b/vendor.tar.xz index 929f8b9..9685e65 100644 --- a/vendor.tar.xz +++ b/vendor.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3d85270e6b55aafaaf46ebe44551ebcc96841ae522a51710356d7b2c2c2ef48c -size 18414380 +oid sha256:7b142fbc3ab44c7ecd5e3cf6b9ffc6ac94979905d5477a1d5f4a68bfd742adc7 +size 18598028