From e627d309fd7adc09173955aae672775d92f6be59 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Wed, 10 Apr 2013 17:35:05 +0200 Subject: [PATCH] bash-completion: support the "$out/share/bash-completion" location used by modern packages --- modules/programs/bash/bash.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/programs/bash/bash.nix b/modules/programs/bash/bash.nix index 493df762e171..d227ef729db2 100644 --- a/modules/programs/bash/bash.nix +++ b/modules/programs/bash/bash.nix @@ -18,7 +18,7 @@ let nullglobStatus=$(shopt -p nullglob) shopt -s nullglob for p in $NIX_PROFILES; do - for m in "$p/etc/bash_completion.d/"*; do + for m in "$p/etc/bash_completion.d/"* "$p/share/bash-completion/completions/"*; do . $m done done @@ -146,5 +146,8 @@ in mv /bin/.sh.tmp /bin/sh # atomically replace /bin/sh ''; - environment.pathsToLink = optional cfg.enableBashCompletion "/etc/bash_completion.d"; + environment.pathsToLink = optionals cfg.enableBashCompletion [ + "/etc/bash_completion.d" + "/share/bash-completion" + ]; }