aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/bash-completion-directories.patch
diff options
context:
space:
mode:
authorTomáš Čech <sleep_walker@gnu.org>2016-08-07 12:02:27 +0200
committerTomáš Čech <sleep_walker@gnu.org>2016-08-09 09:23:38 +0200
commitba6d25f3b953392136ead2f1ca8af71466da2dae (patch)
treef4aaf2fc7d1897bdfc83937af294b5322b4fc931 /gnu/packages/patches/bash-completion-directories.patch
parentaa67d3c546d1023ea40e92afff3eb0703ac92032 (diff)
downloadguix-ba6d25f3b953392136ead2f1ca8af71466da2dae.tar
guix-ba6d25f3b953392136ead2f1ca8af71466da2dae.tar.gz
gnu: bash-completion: Update to 2.3. Update the patch.
* gnu/packages/bash.scm (bash-completion): Update to 2.3. * gnu/packages/patches/bash-completion-directories.patch: New version of the patch for the same purpose.
Diffstat (limited to 'gnu/packages/patches/bash-completion-directories.patch')
-rw-r--r--gnu/packages/patches/bash-completion-directories.patch40
1 files changed, 17 insertions, 23 deletions
diff --git a/gnu/packages/patches/bash-completion-directories.patch b/gnu/packages/patches/bash-completion-directories.patch
index 1a3e2f55c5..351a8e02fb 100644
--- a/gnu/packages/patches/bash-completion-directories.patch
+++ b/gnu/packages/patches/bash-completion-directories.patch
@@ -7,27 +7,21 @@ 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.
---- bash-completion-2.1/bash_completion 2015-03-11 09:45:45.056846446 +0100
-+++ bash-completion-2.1/bash_completion 2015-03-11 09:52:43.248159504 +0100
-@@ -1928,9 +1928,20 @@ _completion_loader()
- local compfile=./completions
- [[ $BASH_SOURCE == */* ]] && compfile="${BASH_SOURCE%/*}/completions"
- compfile+="/${1##*/}"
-+ local base="${1##*/}"
-
-+ # Look for completion files in the user and global profiles and
-+ # lastly in 'bash-completion' itself.
-+ for file in \
-+ "$HOME/.guix-profile/share/bash-completion/completions/$base" \
-+ "$HOME/.guix-profile/etc/bash_completion.d/$base" \
-+ "/run/current-system/profile/share/bash-completion/completions/$base" \
-+ "/run/current-system/profile/etc/bash_completion.d/$base" \
-+ "$compfile"
-+ do
- # Avoid trying to source dirs; https://bugzilla.redhat.com/903540
-- [[ -f "$compfile" ]] && . "$compfile" &>/dev/null && return 124
-+ [[ -f "$file" ]] && . "$file" &>/dev/null && return 124
-+ done
+
+--- a/bash_completion 2016-08-03 10:23:02.356782287 +0200
++++ b/bash_completion 2016-08-03 10:27:50.120140403 +0200
+@@ -1960,7 +1960,13 @@
- # Need to define *something*, otherwise there will be no completion at all.
- complete -F _minimal "$1" && return 124
+ __load_completion()
+ {
+- local -a dirs=( ${BASH_COMPLETION_USER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion}/completions )
++ local -a dirs=(
++ "$HOME/.guix-profile/share/bash-completion/completions/$base"
++ "$HOME/.guix-profile/etc/bash_completion.d/$base"
++ "/run/current-system/profile/share/bash-completion/completions/$base"
++ "/run/current-system/profile/etc/bash_completion.d/$base"
++ ${BASH_COMPLETION_USER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion}/completions )
++
+ 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 )