Consider including shell completions in the package:
---
PKGBUILD | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/PKGBUILD b/PKGBUILD
index 25ba4ed..14a3e8a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
_pkgname=eww
pkgname="$_pkgname-git"
-pkgver=0.6.0.r53.g8661abf
+pkgver=0.6.0.r62.g50ec181
pkgrel=1
pkgdesc="ElKowar's wacky widgets"
arch=(x86_64)
@@ -20,6 +20,7 @@ prepare() {
cd $_pkgname
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
+ mkdir completions
}
pkgver() {
@@ -31,6 +32,10 @@ build() {
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --frozen --release
+ local compgen="target/release/eww shell-completions -s"
+ $compgen bash >"completions/$_pkgname"
+ $compgen fish >"completions/$_pkgname.fish"
+ $compgen zsh >"completions/_$_pkgname"
}
package() {
@@ -39,4 +44,7 @@ package() {
install -d "$pkgdir/etc/xdg/$_pkgname/"
cp -r examples/eww-bar "$pkgdir/etc/xdg/$_pkgname/"
install -Dm755 target/release/$_pkgname -t "$pkgdir/usr/bin/"
+ install -Dm 644 "completions/$_pkgname" -t "$pkgdir/usr/share/bash-completion/completions/"
+ install -Dm 644 "completions/$_pkgname.fish" -t "$pkgdir/usr/share/fish/vendor_completions.d/"
+ install -Dm 644 "completions/_$_pkgname" -t "$pkgdir/usr/share/zsh/site-functions/"
}
--
2.47.0
Pinned Comments
eclairevoyant commented on 2023-04-03 17:29 (UTC)
Adopted and updated. Make sure to fetch the signing keys from GitHub and import them before building: