12_history.zsh 432 B

1234567891011121314151617181920
  1. #
  2. # History options
  3. #
  4. setopt extendedhistory # add a timestamp and the duration of each command
  5. setopt sharehistory # _all_ zsh sessions share the same history files
  6. setopt histignorealldups # ignores duplications
  7. HISTDIR="${ZSHDOTDIR}/history"
  8. if [ ! -d "$HISTDIR" ]; then
  9. mkdir -p "$HISTDIR"
  10. fi
  11. HISTFILE="$HISTDIR/history"
  12. HISTSIZE=1000000
  13. SAVEHIST=1000000
  14. export HISTFILE HISTSIZE SAVEHIST
  15. unset HISTDIR