From 173f79f6908e6832b8136b3015325298874d9911 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Thu, 21 Mar 2019 10:24:20 -0500 Subject: [PATCH] zsh: don't export HISTFILE and friends Just set them normally. Exporting them will propagate them to all executed programs such as bash (as used by nix-shell or nix run), and badness ensues when different formats are used. --- nixos/modules/programs/zsh/zsh.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nixos/modules/programs/zsh/zsh.nix b/nixos/modules/programs/zsh/zsh.nix index 4b995b66a26..deb94922da8 100644 --- a/nixos/modules/programs/zsh/zsh.nix +++ b/nixos/modules/programs/zsh/zsh.nix @@ -189,9 +189,10 @@ in . /etc/zinputrc - export SAVEHIST=${toString cfg.histSize} - export HISTSIZE=${toString cfg.histSize} - export HISTFILE=${cfg.histFile} + # Don't export these, otherwise other shells (bash) will try to use same histfile + SAVEHIST=${toString cfg.histSize} + HISTSIZE=${toString cfg.histSize} + HISTFILE=${cfg.histFile} ${optionalString (cfg.setOptions != []) "setopt ${concatStringsSep " " cfg.setOptions}"}