Package Details: cooklang-chef 0.9.1-2

Git Clone URL: https://aur.archlinux.org/cooklang-chef.git (read-only, click to copy)
Package Base: cooklang-chef
Description: A CLI to manage cooklang recipes
Upstream URL: https://github.com/Zheoni/cooklang-chef
Licenses: MIT
Submitter: kirasok
Maintainer: kirasok
Last Packager: kirasok
Votes: 3
Popularity: 0.022042
First Submitted: 2023-07-13 03:06 (UTC)
Last Updated: 2024-08-10 17:57 (UTC)

Dependencies (1)

Required by (0)

Sources (2)

Latest Comments

CosmicHorror commented on 2024-05-27 23:14 (UTC) (edited on 2024-05-27 23:20 (UTC) by CosmicHorror)

Thanks for the package! I'd like to recommend also installing shell completions if you wouldn't mind. The following patch handles installing for the big three shells in their expected locations

diff --git a/cooklang-chef/PKGBUILD b/cooklang-chef/PKGBUILD
index efb73f1..f2c0bc9 100644
--- a/cooklang-chef/PKGBUILD
+++ b/cooklang-chef/PKGBUILD
@@ -23,6 +23,10 @@ build() {
    export RUSTUP_TOOLCHAIN=stable
    export CARGO_TARGET_DIR=target
    cargo build --frozen --release --all-features
+
+   target/release/chef generate-completions bash > chef.bash
+   target/release/chef generate-completions fish > chef.fish
+   target/release/chef generate-completions zsh > chef.zsh
 }

 check() {
@@ -39,4 +43,8 @@ package() {
        -executable \
        -type f \
        -exec install -Dm0755 -t "$pkgdir/usr/bin/" {} +
+
+        install -Dm644 chef.bash "$pkgdir/usr/share/bash-completion/completions/chef"
+        install -Dm644 chef.fish "$pkgdir/usr/share/fish/vendor_completions.d/chef.fish"
+        install -Dm644 chef.zsh "$pkgdir/usr/share/zsh/site-functions/_chef"
 }