summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Grossar2022-07-08 14:00:55 +0200
committerLukas Grossar2022-07-08 14:00:55 +0200
commitb3905105a0694b33bd22743902b252aee754e73a (patch)
tree9da502b39d504b2b9372dcd4a685b9eb81def64c
parentec5f213585ff29398c56ec328b1bc3fc64dc1b85 (diff)
downloadaur-b3905105a0694b33bd22743902b252aee754e73a.tar.gz
feat(pkgbuild): add shell completion
-rw-r--r--PKGBUILD4
1 files changed, 4 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a64cbee1647b..4b750be6d644 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -14,4 +14,8 @@ options=(!strip)
package() {
install -Dm 755 "$srcdir/k0sctl-linux-x64-$pkgver" "$pkgdir/usr/bin/k0sctl"
+
+ "$pkgdir/usr/bin/k0sctl" completion --shell bash | install -Dm644 /dev/stdin "$pkgdir/usr/share/bash-completion/completions/k0sctl"
+ "$pkgdir/usr/bin/k0sctl" completion --shell zsh | install -Dm644 /dev/stdin "$pkgdir/usr/share/zsh/site-functions/_k0sctl"
+ "$pkgdir/usr/bin/k0sctl" completion --shell fish | install -Dm644 /dev/stdin "$pkgdir/usr/share/fish/vendor_completions.d/k0sctl.fish"
}