How can it be achieved so that every command entered, is visible in every open terminal?

When having multiple terminals open, the history isn't shared, i.e. what you entered in one terminals history, doesn't show up in another one. Think of an alternative to Bash's PROMPT_COMMAND="history -a" (which saves the history before the prompt is beeing displayed).

link|improve this question
feedback

1 Answer

up vote 7 down vote accepted

In the .zshrc file, the following values accomplish this:

  • 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
    
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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