summary refs log tree commit diff
path: root/nixos/modules/programs
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@higgsboson.tk>2016-09-27 21:18:29 +0200
committerJörg Thalheim <joerg@higgsboson.tk>2016-09-27 22:19:53 +0200
commit9049ab1a3b8bd27eda01c605b9dc4d2993e73caf (patch)
tree374fc5b3047dc7045d28c4186f6b839f6dbe41e4 /nixos/modules/programs
parentcb2f84e4d70772804d723b10cc2469bfcd658488 (diff)
downloadnixlib-9049ab1a3b8bd27eda01c605b9dc4d2993e73caf.tar
nixlib-9049ab1a3b8bd27eda01c605b9dc4d2993e73caf.tar.gz
nixlib-9049ab1a3b8bd27eda01c605b9dc4d2993e73caf.tar.bz2
nixlib-9049ab1a3b8bd27eda01c605b9dc4d2993e73caf.tar.lz
nixlib-9049ab1a3b8bd27eda01c605b9dc4d2993e73caf.tar.xz
nixlib-9049ab1a3b8bd27eda01c605b9dc4d2993e73caf.tar.zst
nixlib-9049ab1a3b8bd27eda01c605b9dc4d2993e73caf.zip
zsh: do not export HISTFILE, HISTSIZE, SAVEHIST
Every interactive zsh sources /etc/zshrc (see STARTUP/SHUTDOWN FILES in zshautll(1))
Therefor every interactive zsh process will respect the content of these variables.
Using `export` will also lead to child processes inheriting this value.
This leads to problems, if other interactive shells are spawned such as bash,
because they use an incomptabible history format (without timestamps).
There seems to be also cases, where the local HISTSIZE in ~/.zshrc is
not sourced but /etc/zshrc, which leads to history truncation in other shells.
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r--nixos/modules/programs/zsh/zsh.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/nixos/modules/programs/zsh/zsh.nix b/nixos/modules/programs/zsh/zsh.nix
index 91cd84416921..d81f63c2acca 100644
--- a/nixos/modules/programs/zsh/zsh.nix
+++ b/nixos/modules/programs/zsh/zsh.nix
@@ -102,9 +102,9 @@ in
 
       interactiveShellInit = ''
         # history defaults
-        export SAVEHIST=2000
-        export HISTSIZE=2000
-        export HISTFILE=$HOME/.zsh_history
+        SAVEHIST=2000
+        HISTSIZE=2000
+        HISTFILE=$HOME/.zsh_history
 
         setopt HIST_IGNORE_DUPS SHARE_HISTORY HIST_FCNTL_LOCK