Subject: [PATCH v2 1/6] guix: Add shell completion directories.

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

* guix/utils.scm (bash-completion-dir, fish-completion-dir,
zsh-completion-dir, elvish-completion-dir, nu-completion-dir): New
variables.

Change-Id: I076bd26a87f196a32fb9542cd8058fc1d2a12aa9
---
 guix/utils.scm | 38 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 37 insertions(+), 1 deletion(-)

diff --git a/guix/utils.scm b/guix/utils.scm
index c7c23d9d5ba..2108eff7a75 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -7,7 +7,7 @@
 ;;; Copyright © 2015 David Thompson <[email-masked]>
 ;;; Copyright © 2017 Mathieu Othacehe <[email-masked]>
 ;;; Copyright © 2018, 2020 Marius Bakke <[email-masked]>
-;;; Copyright © 2020, 2021, 2024 Efraim Flashner <[email-masked]>
+;;; Copyright © 2020, 2021, 2024, 2025 Efraim Flashner <[email-masked]>
 ;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer <[email-masked]>
 ;;; Copyright © 2021 Simon Tournier <[email-masked]>
 ;;; Copyright © 2021 Chris Marusich <[email-masked]>
@@ -149,6 +149,12 @@ (define-module (guix utils)
             config-directory
             cache-directory
 
+            bash-completion-dir
+            fish-completion-dir
+            zsh-completion-dir
+            elvish-completion-dir
+            nu-completion-dir
+
             readlink*
             go-to-location
             edit-expression
@@ -1193,6 +1199,36 @@ (define-syntax current-source-directory
           ;; raising an error would upset Geiser users
           #f))))))
 
+
+;;;
+;;; Shell completion directories.
+;;;
+
+(define bash-completion-dir
+  ;; The standard directory for installing bash completions.
+  ;; https://github.com/scop/bash-completion?tab=readme-ov-file#faq
+  "/share/bash-completion/completions/")
+
+(define fish-completion-dir
+  ;; The standard directory for installing fish completions.
+  ;; https://fishshell.com/docs/current/completions.html#where-to-put-completions
+  "/share/fish/vendor_completions.d/")
+
+(define zsh-completion-dir
+  ;; The standard directory for installing zsh completions.
+  ;; https://github.com/z-shell/wiki/blob/main/ecosystem/plugins/zsh_navigation_tools.mdx#install-zsh-navigation-tools
+  "/share/zsh/site-functions/")
+
+(define elvish-completion-dir
+  ;; The standard directory for installing elvish completions.
+  ;; https://elv.sh/ref/command.html#module-search-directories
+  "/share/elvish/lib/")
+
+(define nu-completion-dir
+  ;; The standard directory for installing nushell completions.
+  ;; https://www.nushell.sh/book/configuration.html#startup-variables
+  "/share/nushell/vendor/autoload/")
+
 
 ;;;
 ;;; String comparison.
-- 
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