summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlen <alen@dotfiles.xyz>2023-09-23 23:09:59 +0400
committerAlen <alen@dotfiles.xyz>2023-09-23 23:09:59 +0400
commit923983285eb516aef65638afe16cb0fc21e90b8b (patch)
treedc991316cada2b946b79dc25db32133b071bdacf
parent9b364cb7b5463167f17c6c7c7a634c1e6835eac0 (diff)
Fix history potentially being reset with /etc/zshrc
-rw-r--r--dot_zshenv3
-rw-r--r--dot_zshrc5
2 files changed, 5 insertions, 3 deletions
diff --git a/dot_zshenv b/dot_zshenv
index 8821f87..27779ba 100644
--- a/dot_zshenv
+++ b/dot_zshenv
@@ -8,9 +8,6 @@ setopt hist_verify            # show command with history expansion to user befo
 setopt share_history          # share command history data
 setopt hist_find_no_dups      # filter out (even non-contiguous) entries when from history search
 unsetopt flowcontrol          # do not use ^S/^Q for flor control
-export HISTFILE="${HOME}/.zsh_history"
-export HISTSIZE=1000000
-export SAVEHIST=1000000
 
 # Common nice-to-haves
 setopt auto_cd                # Auto-cd into directory if only directory name used as command
diff --git a/dot_zshrc b/dot_zshrc
index d62132d..13b626a 100644
--- a/dot_zshrc
+++ b/dot_zshrc
@@ -1,3 +1,8 @@
+# Set up nice and lengthy history
+export HISTFILE="${ZDOTDIR:-$HOME}/.zsh_history"
+export HISTSIZE=1000000
+export SAVEHIST=1000000
+
 # Simple prompt
 PROMPT="%F{15}%K{4}%n@%M:%~%f%k "
 RPROMPT="%(?.%F{10}%?.%F{9}%?)%f %T"