Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Partly revert c0a2a4d again
As it turns out, zsh has defaults on HISTSIZE and SAVEHIST. I have lost track
off zsh defaults a long time ago. This is a reason not to do this at all.
HISTSIZE's default is 30, SAVEHIST's default is 0. And the latter is a big
problem: No history will be saved anymore.

If someone wants different values for these two parameters, they can set them
in .zshrc.local. I am NOT working around this by comparing the actual value to
zsh's defaults.

The combined diff of c0a2a4d and this commit looks like this:

[snip]
--- a/etc/zsh/zshrc
+++ b/etc/zsh/zshrc
@@ -1582,7 +1582,7 @@ function command_not_found_handler () {
 # history

 #v#
-HISTFILE=${ZDOTDIR:-${HOME}}/.zsh_history
+HISTFILE=${HISTFILE:-${ZDOTDIR:-${HOME}}/.zsh_history}
 isgrmlcd && HISTSIZE=500  || HISTSIZE=5000
 isgrmlcd && SAVEHIST=1000 || SAVEHIST=10000 # useful for setopt append_history
[snap]

Closes: Github bugreport #64
  • Loading branch information
ft committed Dec 30, 2017
1 parent c0a2a4d commit af65087
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions etc/zsh/zshrc
Expand Up @@ -1583,8 +1583,8 @@ function command_not_found_handler () {

#v#
HISTFILE=${HISTFILE:-${ZDOTDIR:-${HOME}}/.zsh_history}
isgrmlcd && HISTSIZE=500 || HISTSIZE=${HISTSIZE:-5000}
isgrmlcd && SAVEHIST=1000 || SAVEHIST=${SAVEHIST:-10000} # useful for setopt append_history
isgrmlcd && HISTSIZE=500 || HISTSIZE=5000
isgrmlcd && SAVEHIST=1000 || SAVEHIST=10000 # useful for setopt append_history

# dirstack handling

Expand Down

0 comments on commit af65087

Please sign in to comment.