6

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.

  • 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
6

Try adding:

setopt no_share_history
unsetopt share_history

to ~/.zshrc ... this should work

  • Moving them from ~/.zpreztorc to ~/.zshrc fixed it! Thank you. – amfcosta Jul 11 '16 at 18:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.