1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-28 02:37:09 +00:00

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
This commit is contained in:
Väinö Järvelä 2019-12-12 09:08:02 +02:00 committed by Daiderd Jordan
parent 3fde04a384
commit e1000fc1a6
No known key found for this signature in database
GPG key ID: D02435D05B810C96

View file

@ -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