I'm using zsh with prezto (on OSX and inside tmux, not sure if it matters), and from time to time history gets shared between multiple terminals.
I already added unsetopt share_history and also unsetopt SHARE_HISTORY to the end of my .zpreztorc, but it keeps mixing up history.
The output of setopt shows that "sharehistory" is still there! Even after adding unsetopt sharehistory.