From 1b64bbd9c4853555daaf999d23d0e83c90c08a12 Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Fri, 7 Jun 2024 17:48:06 +0200 Subject: [PATCH] k9s: install completions --- srcpkgs/k9s/template | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/srcpkgs/k9s/template b/srcpkgs/k9s/template index 5a42f968ffcfec..eb361efff7788b 100644 --- a/srcpkgs/k9s/template +++ b/srcpkgs/k9s/template @@ -1,7 +1,7 @@ # Template file for 'k9s' pkgname=k9s version=0.32.4 -revision=1 +revision=2 build_style=go go_import_path="github.com/derailed/k9s" go_ldflags="-X ${go_import_path}/cmd.version=${version}" @@ -14,3 +14,15 @@ checksum=597fa2c547437070a8993d1fb6fce91d696bd3731d37230feace3a2d3bfdb198 # fix: collect2: fatal error: cannot find 'ld' export LDFLAGS="-fuse-ld=bfd" + +post_build() { + for shell in bash zsh fish; do + _build-k9s-xbps/bin/k9s completion $shell >k9s.$shell + done +} + +post_install() { + for shell in bash zsh fish; do + vcompletion k9s.$shell $shell + done +}