I use ZSH with Oh My Zsh. I would like each new ZSH shell to start with an empty history. Commands typed in one shell should never show up in the history of another shell. How can I achieve this?
I've tried appending the following to my
~/.zshrc to no avail:
setopt no_share_history unsetopt share_history unsetopt inc_append_history unsetopt append_history
I have also tried following this answer to make the arrow keys only show local history, but that seemed to have no effect.
Currently, if I open a new shell, it imports history. I cannot seem to delete the history; when I delete
~/.zsh_history, it re-appears with the entire old content once I open a new shell.
inc_append_history does prevent history from being written right away, but the history will still eventually be saved once the shell is closed.