Share history in multiple zsh shell
- by michael
I am trying to setup zsh so that it shares command history between different zsh sessions:
in multiple tabs
in multiple gnome-terminals
in different screen sessions
I have put this in .zshrc
#To save every command before it is executed (this is different from bash's history -a solution):
setopt inc_append_history
#To retrieve the history file everytime history is called upon.
setopt share_history
but that does not work.
e.g. I type 1 command: gedit afile
and then I go to and zsh and type history. I don't see gedit afile.
output of 'setopt' is
% setopt
nohistbeep
histexpiredupsfirst
histfindnodups
histignorealldups
histignoredups
histignorespace
histnostore
histreduceblanks
histsavenodups
histverify
incappendhistory
interactive
monitor
promptsubst
sharehistory
shinstdin
zle
How can I achieve this?