Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save klemens/4b5f14361dbf7a2ddd453bcfb5694b2c to your computer and use it in GitHub Desktop.
Save klemens/4b5f14361dbf7a2ddd453bcfb5694b2c to your computer and use it in GitHub Desktop.
From 1decccf37fb51c896767f86626f8b1837f4ad9da Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Klemens=20Sch=C3=B6lhorn?= <klemens@schoelhorn.eu>
Date: Mon, 26 Aug 2019 01:31:06 +0200
Subject: [PATCH] Install bash, zsh, and fish completions
---
PKGBUILD | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/PKGBUILD b/PKGBUILD
index 30e1a37..1cc7894 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -15,6 +15,7 @@ sha256sums=('9a18110c21e13c43d4b3b2d7b4e6a2b6e06bcf07dc7c95cbaff1e62406c37db7')
build() {
cd "$pkgname-$pkgver"
+ export SHELL_COMPLETIONS_DIR="$PWD/completions"
cargo build --release
}
@@ -24,4 +25,11 @@ package() {
install -Dm755 "target/release/$pkgname" "$pkgdir/usr/bin/$pkgname"
for license in APACHE MIT; do install -Dm644 "LICENSE-$license" \
"$pkgdir/usr/share/licenses/$pkgname/LICENSE-$license"; done
+
+ install -Dm644 completions/_pastel \
+ "$pkgdir/usr/share/zsh/site-functions/_pastel"
+ install -Dm644 completions/pastel.bash \
+ "$pkgdir/usr/share/bash-completion/completions/pastel"
+ install -Dm644 completions/pastel.fish \
+ "$pkgdir/usr/share/fish/vendor_completions.d/pastel.fish"
}
--
2.23.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment