tdl: add shell completions (#19818)

This commit is contained in:
Filipe Nascimento 2024-04-19 07:00:38 -03:00 committed by GitHub
parent 7ff50dc477
commit d4e8eccb6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 14 additions and 0 deletions

View File

@ -4,6 +4,7 @@ TERMUX_PKG_LICENSE="AGPL-V3"
TERMUX_PKG_LICENSE_FILE="LICENSE"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="0.16.2"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/iyear/tdl/archive/refs/tags/v$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=aaae011e6c2f453a9d53b08de87dad04caeb90b0a8e9bf3c07abf1d2eb84a33f
TERMUX_PKG_BUILD_IN_SRC=true
@ -16,4 +17,17 @@ termux_step_make() {
termux_step_make_install() {
install -Dm700 -t $TERMUX_PREFIX/bin tdl
install -Dm644 /dev/null "$TERMUX_PREFIX"/share/bash-completion/completions/tdl
install -Dm644 /dev/null "$TERMUX_PREFIX"/share/zsh/site-functions/_tdl
install -Dm644 /dev/null "$TERMUX_PREFIX"/share/fish/vendor_completions.d/tdl.fish
}
termux_step_create_debscripts() {
cat <<-EOF >./postinst
#!${TERMUX_PREFIX}/bin/sh
tdl completion bash > "${TERMUX_PREFIX}/share/bash-completion/completions/tdl"
tdl completion zsh > "${TERMUX_PREFIX}/share/zsh/site-functions/_tdl"
tdl completion fish > "${TERMUX_PREFIX}/share/fish/vendor_completions.d/tdl.fish"
EOF
}