all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 3c6b3082eaf84eb6885e0fe87d2fb90b4fb3e05b 1389 bytes (raw)
name: gnu/packages/patches/bash-completion-directories.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
 
Bash-completion is written with FHS in mind where completion scripts
all get added to /usr/share/bash-completion/completions and are picked
up by the dynamic completion loader from there---whether they are
part of bash-completion or installed by another package.

On Guix systems, we want not only to search within bash-completion's own
directory, but also in the user's profile and in the system profile.
This is what this patch does.


--- a/bash_completion
+++ b/bash_completion
@@ -2016,7 +2016,15 @@ complete -F _minimal ''
 
 __load_completion()
 {
-    local -a dirs=( ${BASH_COMPLETION_USER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion}/completions )
+    local -a dirs=(
+        ${BASH_COMPLETION_USER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion}/completions
+        "$HOME/.guix-profile/share/bash-completion/completions/$base"
+        "$HOME/.guix-profile/etc/bash_completion.d/$base"
+        "$HOME/.guix-home/profile/share/bash-completion/completions/$base"
+        "$HOME/.guix-home/profile/etc/bash_completion.d/$base"
+        "/run/current-system/profile/share/bash-completion/completions/$base"
+        "/run/current-system/profile/etc/bash_completion.d/$base" )
+
     local OIFS=$IFS IFS=: dir cmd="${1##*/}" compfile
     for dir in ${XDG_DATA_DIRS:-/usr/local/share:/usr/share}; do
         dirs+=( $dir/bash-completion/completions )

debug log:

solving 3c6b3082ea ...
found 3c6b3082ea in https://yhetil.org/guix/20220831073502.ru6dye2wbgc6vrbu@ubik.pkbd.org/
found 021e34653b in https://git.savannah.gnu.org/cgit/guix.git
preparing index
index prepared:
100644 021e34653bbfae28064b62009099303c9b33bde5	gnu/packages/patches/bash-completion-directories.patch

applying [1/1] https://yhetil.org/guix/20220831073502.ru6dye2wbgc6vrbu@ubik.pkbd.org/
diff --git a/gnu/packages/patches/bash-completion-directories.patch b/gnu/packages/patches/bash-completion-directories.patch
index 021e34653b..3c6b3082ea 100644

Checking patch gnu/packages/patches/bash-completion-directories.patch...
Applied patch gnu/packages/patches/bash-completion-directories.patch cleanly.

index at:
100644 3c6b3082eaf84eb6885e0fe87d2fb90b4fb3e05b	gnu/packages/patches/bash-completion-directories.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.