How To Share History Between Terminals
When setopt share_history is enabled, it reads and writes to the history file.
When setopt inc_append_history is enabled, it only writes to the history file.
shopt -s histappend PROMPT_COMMAND="history -a;$PROMPT_COMMAND"Via
- bash - Is it possible to make writing to .bash_history immediate? - Ask Ubunt
- command line - How do you share history between terminals in zsh? - Ask Ubuntu