Make a couple of history parameters adhere to presets
authorFrank Terbeck <ft@grml.org>
Tue, 28 Nov 2017 20:37:44 +0000 (21:37 +0100)
committerFrank Terbeck <ft@grml.org>
Tue, 28 Nov 2017 20:37:44 +0000 (21:37 +0100)
Requested on IRC, and I don't see why not.

etc/zsh/zshrc

index c688f28..c64a1f8 100644 (file)
@@ -1582,9 +1582,9 @@ function command_not_found_handler () {
 # history
 
 #v#
-HISTFILE=${ZDOTDIR:-${HOME}}/.zsh_history
-isgrmlcd && HISTSIZE=500  || HISTSIZE=5000
-isgrmlcd && SAVEHIST=1000 || SAVEHIST=10000 # useful for setopt append_history
+HISTFILE=${HISTFILE:-${ZDOTDIR:-${HOME}}/.zsh_history}
+isgrmlcd && HISTSIZE=500  || HISTSIZE=${HISTSIZE:-5000}
+isgrmlcd && SAVEHIST=1000 || SAVEHIST=${SAVEHIST:-10000} # useful for setopt append_history
 
 # dirstack handling