From 24a44c98d297c623ac956be7641354b3b0cb3a0c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 31 Jul 2013 14:55:24 +0200 Subject: [PATCH] bash: Disable hashing of command lookups in interactive shells This just confuses people when (say) using multiple profiles. Performance benefits for interactive shells are likely to be very small anyway. --- modules/programs/bash/bash.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/programs/bash/bash.nix b/modules/programs/bash/bash.nix index d227ef729db..a4b71cfc276 100644 --- a/modules/programs/bash/bash.nix +++ b/modules/programs/bash/bash.nix @@ -102,9 +102,9 @@ in target = "profile"; } - { # /etc/bashrc: executed every time a bash starts. Sources - # /etc/profile to ensure that the system environment is - # configured properly. + { # /etc/bashrc: executed every time an interactive bash + # starts. Sources /etc/profile to ensure that the system + # environment is configured properly. source = pkgs.substituteAll { src = ./bashrc.sh; inherit (cfg) interactiveShellInit; @@ -133,6 +133,9 @@ in ${cfg.promptInit} ${initBashCompletion} ${shellAliases} + + # Disable hashing (i.e. caching) of command lookups. + set +h ''; system.build.binsh = pkgs.bashInteractive;