Subject: [bug#77181] [PATCH v2 5/6] gnu: zoxide: Fix shell completion directories.

From: Efraim Flashner <[email-masked]>
Date: Thu, 27 Mar 2025 10:46:44 +0200

From: 45mg <[email-masked]>

* gnu/packages/rust-apps.scm (zoxide) [arguments]: Use the shell
completion directory variables.

Change-Id: I55f1a9f5c37a6b795f0021ea8b08f472c16847e9
---
 gnu/packages/rust-apps.scm | 22 +++++++---------------
 1 file changed, 7 insertions(+), 15 deletions(-)

diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 55861ecc924..48fefd3064a 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -4864,30 +4864,22 @@ (define-public zoxide
                  (lambda _
                    (let* ((out #$output)
                           (share (string-append out "/share"))
-                          (man1 (string-append share "/man/man1"))
-                          (bash-completions-dir
-                            (string-append out "/etc/bash-completion.d"))
-                          (zsh-completions-dir
-                            (string-append share "/zsh/site-functions"))
-                          (fish-completions-dir
-                            (string-append share "/fish/vendor_completions.d"))
-                          (elvish-completions-dir
-                            (string-append share "/elvish/lib")))
+                          (man1 (string-append share "/man/man1")))
                      ;; The completions are generated in build.rs.
                      (mkdir-p man1)
-                     (mkdir-p bash-completions-dir)
-                     (mkdir-p elvish-completions-dir)
+                     (mkdir-p (string-append out #$bash-completion-dir))
+                     (mkdir-p (string-append out #$elvish-completion-dir))
                      (for-each (lambda (file)
                                  (install-file file man1))
                                (find-files "man/man1"))
                      (copy-file "contrib/completions/zoxide.bash"
-                                (string-append bash-completions-dir "/zoxide"))
+                                (string-append out #$bash-completion-dir "/zoxide"))
                      (install-file "contrib/completions/zoxide.fish"
-                                   fish-completions-dir)
+                                   (string-append out #$fish-completion-dir))
                      (install-file "contrib/completions/_zoxide"
-                                   zsh-completions-dir)
+                                   (string-append out #$zsh-completion-dir))
                      (copy-file "contrib/completions/zoxide.elv"
-                                (string-append elvish-completions-dir
+                                (string-append out #$elvish-completion-dir
                                                "/zoxide"))))))))
     (home-page "https://github.com/ajeetdsouza/zoxide/")
     (synopsis "Fast way to navigate your file system")
-- 
Efraim Flashner   <[email-masked]>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted