Skip to content

Commit e627d30

Browse files
committed
bash-completion: support the "$out/share/bash-completion" location used by modern packages
1 parent a215600 commit e627d30

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

modules/programs/bash/bash.nix

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ let
1818
nullglobStatus=$(shopt -p nullglob)
1919
shopt -s nullglob
2020
for p in $NIX_PROFILES; do
21-
for m in "$p/etc/bash_completion.d/"*; do
21+
for m in "$p/etc/bash_completion.d/"* "$p/share/bash-completion/completions/"*; do
2222
. $m
2323
done
2424
done
@@ -146,5 +146,8 @@ in
146146
mv /bin/.sh.tmp /bin/sh # atomically replace /bin/sh
147147
'';
148148

149-
environment.pathsToLink = optional cfg.enableBashCompletion "/etc/bash_completion.d";
149+
environment.pathsToLink = optionals cfg.enableBashCompletion [
150+
"/etc/bash_completion.d"
151+
"/share/bash-completion"
152+
];
150153
}

0 commit comments

Comments
 (0)