From 970a326ebb2e5c860b1092f21c6595fbf5de96e8 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Mon, 20 Aug 2012 16:36:20 +0200 Subject: [PATCH] bash-completion: automatically source any completion files that the user might have installed in ~/.nix-profile/etc/bash_completion.d --- pkgs/shells/bash-completion/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/shells/bash-completion/default.nix b/pkgs/shells/bash-completion/default.nix index 7e4c0f230155..d79c9774569b 100644 --- a/pkgs/shells/bash-completion/default.nix +++ b/pkgs/shells/bash-completion/default.nix @@ -11,6 +11,11 @@ stdenv.mkDerivation { sha256 = "e5a490a4301dfb228361bdca2ffca597958e47dd6056005ef9393a5852af5804"; }; + postInstall = '' + sed -i "$out/share/bash-completion/bash_completion" \ + -e 's|: .{BASH_COMPLETION_COMPAT_DIR:=.*}|BASH_COMPLETION_COMPAT_DIR="$HOME/.nix-profile/etc/bash_completion.d"|' + ''; + doCheck = true; meta = {