2015-03-12 21:08:04 +00:00
|
|
|
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.
|
|
|
|
|
2016-08-07 10:02:27 +00:00
|
|
|
|
2018-03-19 13:43:23 +00:00
|
|
|
--- a/bash_completion
|
|
|
|
+++ b/bash_completion
|
|
|
|
@@ -2016,7 +2016,13 @@ complete -F _minimal ''
|
2015-03-12 21:08:04 +00:00
|
|
|
|
2016-08-07 10:02:27 +00:00
|
|
|
__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 )
|
|
|
|
+
|
2018-03-19 13:43:23 +00:00
|
|
|
local OIFS=$IFS IFS=: dir cmd="${1##*/}" compfile
|
2016-08-07 10:02:27 +00:00
|
|
|
for dir in ${XDG_DATA_DIRS:-/usr/local/share:/usr/share}; do
|
|
|
|
dirs+=( $dir/bash-completion/completions )
|