Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: .zsh_history



On Sat, Apr 8, 2023 at 11:54 AM Roman Perepelitsa
<roman.perepelitsa@xxxxxxxxx> wrote:
>
> On Sat, Apr 8, 2023 at 6:17 PM Perry Smith <pedz@xxxxxxxxxxxxxxxx> wrote:
> >
> > I don’t have anything special set up other than setting HISTFILE, HISTSIZE=2097152, and SAVEHIST=1048576.  I also have histignoredups and histignorealldups on.
> >
> >
> > TL; DR: question: Does zsh re-read the .zsh_history file at the time it is exiting by default?
>
> Yes. If you exit all shells, you'll have history from all of them
> saved within $HISTFILE.

That isn't true.

That's true *only* if APPEND_HISTORY is set, which yeah, is the
default, but still, let's be clear.

When APPEND_HISTORY isn't set, only the history of the last shell is saved.

-- 
Felipe Contreras




Messages sorted by: Reverse Date, Date, Thread, Author