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.
commit9049ab1a3b8bd27eda01c605b9dc4d2993e73caf
authorJörg Thalheim <joerg@higgsboson.tk>
dateTue 27 Sep 2016, 21:18 (10 years ago)
parentcb2f84e
nixos/modules/programs/zsh/zsh.nix+3−3
@@ -102,9 +102,9 @@ in
102102
103103 interactiveShellInit = ''
104104 # history defaults
105− export SAVEHIST=2000
106− export HISTSIZE=2000
107− export HISTFILE=$HOME/.zsh_history
105+ SAVEHIST=2000
106+ HISTSIZE=2000
107+ HISTFILE=$HOME/.zsh_history
108108
109109 setopt HIST_IGNORE_DUPS SHARE_HISTORY HIST_FCNTL_LOCK
110110