From 9988224c2a1632ae9ee9ab0ba19b79e014d4f681 Mon Sep 17 00:00:00 2001 From: Tor Hedin Brønner Date: Sun, 10 Dec 2017 09:54:00 +0100 Subject: nixos/programs/bash: Let bash-completion lazy load scripts 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 #32533 --- nixos/modules/programs/bash/bash.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/programs/bash/bash.nix b/nixos/modules/programs/bash/bash.nix index ef1acdfe66e6..52d3780e045c 100644 --- a/nixos/modules/programs/bash/bash.nix +++ b/nixos/modules/programs/bash/bash.nix @@ -20,7 +20,7 @@ let 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 . $m done done -- cgit 1.4.1