title: zsh ignores SAVEHIST size
body: <p>Today I made the switch from bash to zsh (+ oh-my-zsh) on my Mac. In bash I kept an <code>.bash_eternal_history</code> with over 30k entries. I migrated that into the <code>.zsh_history</code> file and format.</p>
  
  <p>Now I set these vars to keep an eternal history in zsh (taken from [1]):</p>
  
  <pre><code>HISTFILE="$HOME/.zsh_history"
  HISTSIZE=10000000
  SAVEHIST=10000000
  setopt BANG_HIST                 # Treat the '!' character specially during expansion.
  setopt EXTENDED_HISTORY          # Write the history file in the ":start:elapsed;command" format.
  setopt INC_APPEND_HISTORY        # Write to the history file immediately, not when the shell exits.
  setopt SHARE_HISTORY             # Share history between all sessions.
  setopt HIST_EXPIRE_DUPS_FIRST    # Expire duplicate entries first when trimming history.
  setopt HIST_IGNORE_DUPS          # Don't record an entry that was just recorded again.
  setopt HIST_IGNORE_ALL_DUPS      # Delete old recorded entry if new entry is a duplicate.
  setopt HIST_FIND_NO_DUPS         # Do not display a line previously found.
  setopt HIST_IGNORE_SPACE         # Don't record an entry starting with a space.
  setopt HIST_SAVE_NO_DUPS         # Don't write duplicate entries in the history file.
  setopt HIST_REDUCE_BLANKS        # Remove superfluous blanks before recording entry.
  setopt HIST_VERIFY               # Don't execute immediately upon history expansion.
  setopt HIST_BEEP                 # Beep when accessing nonexistent history.
  </code></pre>
  
  <p>[1] <a href="https://unix.stackexchange.com/a/273863">https://unix.stackexchange.com/a/273863</a></p>
  
  <p>But the number in SAVEHIST get's ignored. No matter how high I set it, when I type <code>echo $SAVEHIST</code> in my shell, I get <code>10,000</code> and my <code>.zsh_history</code> file with over 30k entries gets capped at <code>10,000</code></p>
  
  <p>What am I missing? </p>