v0.12.0-1
This commit is contained in:
11
_tea
Normal file
11
_tea
Normal file
@@ -0,0 +1,11 @@
|
||||
#compdef tea
|
||||
|
||||
_tea() {
|
||||
local -a opts
|
||||
local cur
|
||||
cur=${words[-1]}
|
||||
opts=("${(@f)$(${words[@]:0:#words[@]-1} --generate-shell-completion)}")
|
||||
compadd -S '' -- "${opts[@]}"
|
||||
}
|
||||
|
||||
compdef _tea tea
|
||||
14
tea.bash
Normal file
14
tea.bash
Normal file
@@ -0,0 +1,14 @@
|
||||
# bash completion for tea
|
||||
|
||||
_tea_bash_autocomplete() {
|
||||
if [[ "${COMP_WORDS[0]}" != "source" ]]; then
|
||||
local cur opts
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
opts=$(${COMP_WORDS[@]:0:$COMP_CWORD} --generate-shell-completion)
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
complete -o bashdefault -o default -o nospace -F _tea_bash_autocomplete tea
|
||||
1
tea.fish
Normal file
1
tea.fish
Normal file
@@ -0,0 +1 @@
|
||||
complete -c tea -f -a '(tea --generate-shell-completion)'
|
||||
46
tea.spec
Normal file
46
tea.spec
Normal file
@@ -0,0 +1,46 @@
|
||||
Name: tea
|
||||
Version: 0.12.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Gitea CLI tool for interacting with Gitea servers.
|
||||
License: MIT
|
||||
Group: System Environment/Base
|
||||
URL: https://gitea.com/gitea/tea
|
||||
|
||||
Source0: https://dl.gitea.com/tea/%{version}/tea-%{version}-linux-amd64
|
||||
Source1: https://dl.gitea.com/tea/%{version}/tea-%{version}-linux-arm64
|
||||
Source10: tea.bash
|
||||
Source11: _tea
|
||||
Source12: tea.fish
|
||||
|
||||
ExclusiveArch: x86_64 aarch64
|
||||
|
||||
%description
|
||||
tea is a command line tool to interact with Gitea servers.
|
||||
It uses the Gitea API to manage issues, pull requests, releases and more,
|
||||
similar to how gh works for GitHub.
|
||||
|
||||
%install
|
||||
%{__rm} -rf %{buildroot}
|
||||
|
||||
install -d -m 755 %{buildroot}%{_bindir}
|
||||
%ifarch x86_64
|
||||
install -m 755 %{SOURCE0} %{buildroot}%{_bindir}/tea
|
||||
%endif
|
||||
|
||||
%ifarch aarch64
|
||||
install -m 755 %{SOURCE1} %{buildroot}%{_bindir}/tea
|
||||
%endif
|
||||
|
||||
install -p -D -m 644 %{SOURCE10} %{buildroot}%{_datadir}/bash-completion/completions/tea
|
||||
install -p -D -m 644 %{SOURCE11} %{buildroot}%{_datadir}/zsh/site-functions/_tea
|
||||
install -p -D -m 644 %{SOURCE12} %{buildroot}%{_datadir}/fish/vendor_completions.d/tea.fish
|
||||
|
||||
%clean
|
||||
%{__rm} -rf %{buildroot}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/tea
|
||||
%{_datadir}/bash-completion/completions/tea
|
||||
%{_datadir}/zsh/site-functions/_tea
|
||||
%{_datadir}/fish/vendor_completions.d/tea.fish
|
||||
Reference in New Issue
Block a user