[ZSH] Set history size before anything interruptible

An aborted startup kept /etc/zshrc's SAVEHIST=1000 and truncated
~/.zsh_history on exit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Fabian IsingandClaude Opus 5.5 committed 2026-10-14 13:24:06 +02:00
1 parent 74d1d60845
commit 769166386c
1 file changed
+6
+6
View File
@@ -1,3 +1,9 @@
# First, so an interrupted startup (Ctrl-C) doesn't keep /etc/zshrc's
# SAVEHIST=1000 and truncate the history file on exit
HISTSIZE=100000
SAVEHIST=100000
setopt EXTENDED_HISTORY
source "${ZDOTDIR:-$HOME}/.zsh/lib/startup.zsh"
[[ -d ${ZDOTDIR:-$HOME}/.cache/zsh ]] || mkdir -p ${ZDOTDIR:-$HOME}/.cache/zsh