From 2254dd74199f1aa8126f7e91291fc91369c5efbcdc25623af6e5b8d2605d2d42 Mon Sep 17 00:00:00 2001 From: Soc Virnyl Estela Date: Tue, 4 Oct 2022 15:35:56 +0000 Subject: [PATCH] - Add bash completions - Add zsh completions - Add fish completions - Disable tests since it is "ignored" by default. OBS-URL: https://build.opensuse.org/package/show/utilities/zellij?expand=0&rev=17 --- zellij.changes | 8 ++++++++ zellij.spec | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/zellij.changes b/zellij.changes index c5328f6..f3dc1ff 100644 --- a/zellij.changes +++ b/zellij.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Oct 4 15:34:36 UTC 2022 - Soc Virnyl Estela + +- Add bash completions +- Add zsh completions +- Add fish completions +- Disable tests since it is "ignored" by default. + ------------------------------------------------------------------- Tue Oct 4 04:40:22 UTC 2022 - Soc Virnyl Estela diff --git a/zellij.spec b/zellij.spec index c97b530..79c8bcb 100644 --- a/zellij.spec +++ b/zellij.spec @@ -16,7 +16,7 @@ # -%bcond_without test +%bcond_with test Name: zellij Version: 0.31.4 Release: 0 @@ -43,6 +43,36 @@ infrastructure layer. Zellij includes a layout system, and a plugin system allowing one to create plugins in any language that compiles to WebAssembly. +%package bash-completion +Summary: Bash Completion for %{name} +Group: System/Shells +Supplements: (%{name} and bash-completion) +Requires: bash-completion +BuildArch: noarch + +%description bash-completion +Bash command-line completion support for %{name}. + +%package fish-completion +Summary: Fish Completion for %{name} +Group: System/Shells +Supplements: (%{name} and fish) +Requires: fish +BuildArch: noarch + +%description fish-completion +Fish command-line completion support for %{name}. + +%package zsh-completion +Summary: Zsh Completion for %{name} +Group: System/Shells +Supplements: (%{name} and zsh) +Requires: zsh +BuildArch: noarch + +%description zsh-completion +Zsh command-line completion support for %{name}. + %prep %autosetup -a1 mkdir -p .cargo @@ -67,8 +97,14 @@ mv target/wasm32-wasi/release/*.wasm assets/plugins/ # Build zellij proper %{cargo_build} --all-features +./target/release/zellij setup --generate-completion bash > target/zellij.bash +./target/release/zellij setup --generate-completion fish > target/zellij.fish +./target/release/zellij setup --generate-completion zsh > target/zellij.zsh %install +install -Dm644 -t ./target/zellij.bash %{buildroot}%{_datadir}/bash-completion/completions/zellij +install -Dm644 -t ./target/zellij.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/zellij.fish +install -Dm644 -t ./target/zellij.zsh %{buildroot}%{_datadir}/zsh/site-functions/_zellij %{cargo_install} --all-features %if %{with test} @@ -80,6 +116,15 @@ mv target/wasm32-wasi/release/*.wasm assets/plugins/ %{_bindir}/zellij %license LICENSE.md +%files bash-completion +%{_datadir}/bash-completion/* + +%files fish-completion +%{_datadir}/fish/* + +%files zsh-completion +%{_datadir}/zsh/* + %doc README.md %changelog