Is it possible to not share history between panels / windows in tmux with zsh?

Until recently, I used bash with tmux. bash behaved the way I expected it to behave, where the story is stored in each individual panel and not shared between panels. However, it seems that in zsh, the default for history in panels should be shared . Is there a way to rewrite the default value in zsh so that they are not used when used in tmux?

+5
source share
1 answer

Tmux should have nothing to do with this. So let's focus on setting up Zsh.

You need to jump over a few hoops to get a real-time story to launch Zshs, so itโ€™s amazing that you see it. What settings have you set to manage your Zsh history? Run this to see your settings:

setopt |grep hist 

In order not to save history immediately, you want:

 setopt noincappendhistory setopt nosharehistory 

You can put this in your ~/.zshrc . You can exit running shells to make sure your new settings are in place.

For information on all history-related Zsh options, see man 1 zshoptions and find the History section on several pages. Note that there are also some environment variables that affect the history ( SAVEHISTORY , HISTFILE , HISTFILEIGNORE , HISTSIE , HISTFILESIZE ).

+10
source

All Articles