From d97dc9bad2c9f2f7e2f6fef6ca089109a2802925 Mon Sep 17 00:00:00 2001 From: Adam Chovanec Date: Thu, 11 Sep 2025 21:49:14 +0200 Subject: [PATCH] add shell completion scripts --- .SRCINFO | 2 +- PKGBUILD | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index eb1a274a2eab..e2e66490d9c1 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = grype-bin pkgdesc = A vulnerability scanner for container images and filesystems. pkgver = 0.99.1 - pkgrel = 1 + pkgrel = 2 url = https://github.com/anchore/grype arch = x86_64 license = Apache-2.0 diff --git a/PKGBUILD b/PKGBUILD index fbdf903ff0b7..32f761222817 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,7 +3,7 @@ # Ex-Maintainer: Ray Del Rosario pkgname='grype-bin' pkgver=0.99.1 -pkgrel=1 +pkgrel=2 pkgdesc='A vulnerability scanner for container images and filesystems.' url='https://github.com/anchore/grype' arch=('x86_64') @@ -11,5 +11,12 @@ license=('Apache-2.0') source=("https://github.com/anchore/grype/releases/download/v${pkgver}/grype_${pkgver}_linux_amd64.tar.gz") sha256sums=('7fde4d45fe097daa2554078cd9e81faa43e51266a888337f5446c1ffc42d451f') package() { - install -Dm755 "$srcdir/grype" "${pkgdir}/usr/bin/grype" + "$srcdir/grype" completion zsh > "$srcdir/zsh_grype" + "$srcdir/grype" completion fish > "${srcdir}/fish_grype" + "$srcdir/grype" completion bash > "$srcdir/bash_grype" + + install -D -m 0755 "$srcdir/grype" "${pkgdir}/usr/bin/grype" + install -D -m 0644 "$srcdir/zsh_grype" "$pkgdir/usr/share/zsh/site-functions/_grype" + install -D -m 0644 "${srcdir}/fish_grype" "${pkgdir}/usr/share/fish/completions/grype.fish" + install -D -m 0644 "$srcdir/bash_grype" "$pkgdir/usr/share/bash-completion/completions/grype" }