Hacker News new | ask | show | jobs
by mistahenry 2311 days ago
I was already using zsh and somehow the MacOS upgrade path for making zsh the new default shell deleted my shell history.

This was a short term blow to productivity since I had only made external notes on about half the difficult command line tasks I’d completed since getting this MacBook in 2017.

How do people generally go about backing up this file? Or do most people not

2 comments

I use several tabs and histories override each other, meaning I could never count on a command being present in the history. I’ve always been told an experienced dev has a folder with txt notes, so that is what I did.
I'm pretty sure that you can configure zsh to write to zsh_history every command to prevent this

    setopt inc_append_history
Thank you! I did not know that this option exists!
> How do people generally go about backing up this file? Or do most people not

If you use Time Machine it should be backed up.

I have two hard drives I rotate on and off my computer regularly for Time Machine for redundancy, it’s always worked well so far.