Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Problems with history
- X-seq: zsh-users 30407
- From: Perry Smith <pedz@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Problems with history
- Date: Mon, 15 Dec 2025 10:17:54 -0600
- Arc-authentication-results: i=1; rspamd-659888d77d-l96jv; auth=pass smtp.auth=a2hosting smtp.mailfrom=pedz@xxxxxxxxxxxxxxxx
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1765815486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding:dkim-signature; bh=8kaYaCd5MVyKBIXUvo8s/eEHl7iYFhEWL4LooGh+Q7Y=; b=ALB4u1HdC3ZMVzbBUrmlV8yrZm4IytQK9ZWS5pJZkZyyRa8ddGoJQitrR0lVMSCDXrRR5S dUzpSRsXHlG5qJ9RO8zKDTwScna4vniMfAR9jvCq5XCs7n70dRD9pHoDPi2tm6W6F4eJ85 cZzuAOObmWlXSsuDWzU8TyyMyp4iw+CQN26CtTQr5LBrDv+yGonhArKUY09pYe/hretaRg xhXQb7xEVE+0+lM2PMoCoculId+Gxu47PbMTJe24rxFGZ25JdhySPFgsqDhM+CIBl3FwQU tGTT7k6/jK6OttZ8yMPDS/OM17acV8HeOyBM0lqxQbts/Nm8MDCNjYZlDx8R6A==
- Arc-seal: i=1; a=rsa-sha256; d=mailchannels.net; s=arc-2022; cv=none; t=1765815486; b=v+EKhipcbwnhgl3AQtbHyVUrtnzEeLC7Sgj7fx4Q6G58FMwRw/P1ZiKb6Q5v1ZwDqwLSJK u3rKRGK8kqpafLm0XHx/Uq0F0aR5zadzL75kLQEYT8YmLT5aWpc51yu+aXrecaC+62+jFo v2y9Oe21ltGOF21BfnkxdedZZP1BGkwFYMPCU2Hz1jM75v7bMMOl8lnRUEOVoBAsJfGdsQ GOhMWWfkDMbdIipb9ddJoKSZCeVSn5+2B2Hun13HMoqqYmXXpT8ytTZnNJuHOXtr6LbiN4 ezCCW1S8FksfwQgsFHQXj25zN2hXavtQyl9OENEN3PzbB0fDljxDgTcFdoTvbA==
- Archived-at: <https://zsh.org/users/30407>
- List-id: <zsh-users.zsh.org>
I’ve battled this problem before and I thought I had a fix but I guess not. I’m asking for help on how to debug this.
I want my history to be very large.
I’m on macOS 26
/bin/zsh —version reports zsh 5.9 (arm64-apple-darwin25.0)
/opt/homebrew/bin/zsh —version reports zsh 5.9 (arm-apple-darwin22.1.0)
I’m assuming Terminal uses /bin/zsh
In my login file I have:
: ${HISTFILE:=${ZDOTDIR:-$HOME}/.zsh_history}
SAVEHIST=1048576
(( HISTSIZE = SAVEHIST * 2 ))
For those familiar with macOS’s zsh per session history I have this in my .zshenv:
# Stop the Apple Terminal session history
export SHELL_SESSIONS_DISABLE=1
export SHELL_SESSION_HISTORY=0
The system’s /etc/zshrc has these lines:
# Save command history
HISTFILE=${ZDOTDIR:-$HOME}/.zsh_history
HISTSIZE=2000
SAVEHIST=1000
Yet my history when I first open a Terminal stays at around 1000 lines. I have EXTENDED_HISTORY set yet my history file (1000 lines) only goes back to 12/15/2025 (today)… Oh… Hmmm… I guess when the history is read in, the time and date is not saved?
Some questions that would help me:
When is the history file read in?
Does setting HISTSIZE or SAVEHIST cause the current history list to get truncated?
Is there any other things I should check?
Thank you for your help,
pedz
Messages sorted by:
Reverse Date,
Date,
Thread,
Author