14

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.

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
amfcosta
  • 315
  • 2
  • 8
  • 1
    The output of `setopt` might help show what options are set, if you don't know how your shell is configured. – thrig Jul 11 '16 at 15:03
  • @thrig updated my answer with the output of setopt. "sharehistory" is there o.O – amfcosta Jul 11 '16 at 17:08
  • Okay, what does something like `zsh -xic exit 2>&1 | fgrep '> setopt '` show happening (or make your changes *after* prezto does whatever it does). – thrig Jul 11 '16 at 17:36

1 Answers1

18

Try adding:

setopt no_share_history
unsetopt share_history

to ~/.zshrc ... this should work

tvs
  • 296
  • 4
  • 6