mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-05 04:16:46 +02:00
community/delta: add shell completions
This commit is contained in:
parent
7c56137d02
commit
9f790604a2
@ -2,7 +2,7 @@
|
||||
# Maintainer: Aleks Bunin <alpinelinux@compuix.com>
|
||||
pkgname=delta
|
||||
pkgver=0.17.0
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="Syntax-highlighting pager for git and diff output"
|
||||
url="https://github.com/dandavison/delta"
|
||||
license="MIT"
|
||||
@ -14,6 +14,11 @@ makedepends="
|
||||
libgit2-dev
|
||||
oniguruma-dev
|
||||
"
|
||||
subpackages="
|
||||
$pkgname-bash-completion
|
||||
$pkgname-fish-completion
|
||||
$pkgname-zsh-completion
|
||||
"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/dandavison/delta/archive/refs/tags/$pkgver.tar.gz"
|
||||
options="net"
|
||||
|
||||
@ -41,6 +46,10 @@ prepare() {
|
||||
|
||||
build() {
|
||||
cargo auditable build --release --frozen
|
||||
|
||||
local i; for i in bash fish zsh; do
|
||||
./target/release/delta --generate-completion $i > target/delta.$i
|
||||
done
|
||||
}
|
||||
|
||||
check() {
|
||||
@ -49,6 +58,9 @@ check() {
|
||||
|
||||
package() {
|
||||
install -Dm755 target/release/delta -t "$pkgdir"/usr/bin/
|
||||
install -D -m644 target/delta.bash "$pkgdir"/usr/share/bash-completion/completions/delta
|
||||
install -D -m644 target/delta.fish "$pkgdir"/usr/share/fish/vendor_completions.d/delta.fish
|
||||
install -D -m644 target/delta.zsh "$pkgdir"/usr/share/zsh/site-functions/_delta
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user