I figured it out. Note to Mark: my “login file” is my .zlogin file — and that’s the key. It is read at login time but not by an interactive subshell. If I do normal login / commands / logout I’m ok. But I often drop into an interactive subshell because I’m going to change my path temporarily or something similar. In that case, my .zlogin is not read but /etc/zshrc is read which sets HISTFILE, HISTSIZE, and SAVEHIST. In particular SAVEHIST to 1000. Then I exit the subshell and my .history file gets truncated to 1000. It takes a little extra work but now if I start a login shell it gets just 1000 lines of history. If I then exit my original shell before this new shell, the new shell leaves last and thus truncates the history file short at roughly 1000 lines with no shells left running. I goofed — trying to minimize what is done with each shell. The key is “history” is part of interactive — not login. Thak you for your time
|