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

Re: zsh: corrupt history file

I tracked down the export, removing it works. Must have put that in the .zshrc 5 years ago, when I first looked at it, before deciding it was broken because the history kept getting corrupt.

Perhaps update the man page for $HISTFILE:

    The file to save the history in when an interactive shell exits.  If
    unset, the history is not saved.

    Do not export this parameter, as doing so may cause other shells to
    corrupt the history file.

Thanks Roman,


On 2020-07-29 10:39, Roman Perepelitsa wrote:
On Wed, 29 Jul 2020 at 16:33, Perette Barella <perette@xxxxxxxxxxx <mailto:perette@xxxxxxxxxxx>> wrote:

    Research on Google suggests the 'corrupt history file' problem is rare.
    In my experience, it is not

Are you perchance exporting HISTFILE? You shouldn’t.


Perette Barella • 176 Middlesex Road, Rochester NY 14610 • 585-317-3013
"Once we realize that imperfect understanding is the human condition there is no shame in being wrong, only in failing to correct our mistakes." -- George Soros

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