summaryrefslogtreecommitdiff
path: root/modules/programs
diff options
context:
space:
mode:
authorVäinö Järvelä <vaino@jarve.la>2019-12-12 09:08:02 +0200
committerDaiderd Jordan <daiderd@gmail.com>2020-01-21 12:18:28 +0100
commite1000fc1a6d33e82ecf984a2a2b3fda5badd7049 (patch)
tree98bbf97353f86b175574a0605e4133848527a503 /modules/programs
parent3fde04a384d4edf68b726178349a12b9aeb1e05d (diff)
bash: Let bash load completions lazily
As described in detail here: https://github.com/NixOS/nixpkgs/issues/32533 bash will load completion scripts in $p/share/bash-completion/completions/ on startup instead of letting bash-completion do it's lazy loading. Bash startup will then slow down (very noticeable when bash-completion is installed in a profile). This commit leaves loading of scripts in the hands of bash-completion, improving startup time for everyone using `enableCompletion`. Fixes #101
Diffstat (limited to 'modules/programs')
-rw-r--r--modules/programs/bash/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/programs/bash/default.nix b/modules/programs/bash/default.nix
index 6f5c8e7..7d13c69 100644
--- a/modules/programs/bash/default.nix
+++ b/modules/programs/bash/default.nix
@@ -83,7 +83,7 @@ in
nullglobStatus=$(shopt -p nullglob)
shopt -s nullglob
for p in $NIX_PROFILES; do
- for m in "$p/etc/bash_completion.d/"* "$p/share/bash-completion/completions/"*; do
+ for m in "$p/etc/bash_completion.d/"*; do
source $m
done
done