- 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
This commit is contained in:
Soc Virnyl Estela 2022-10-04 15:35:56 +00:00 committed by Git OBS Bridge
parent e7330ca937
commit 2254dd7419
2 changed files with 54 additions and 1 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue Oct 4 15:34:36 UTC 2022 - Soc Virnyl Estela <socvirnyl.estela@gmail.com>
- 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 <socvirnyl.estela@gmail.com>

View File

@ -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