I have this in my .zshrc:

setopt -o sharehistory

My understanding of sharehistory is that this would cause the HISTFILE to be updated after each command. However, it is still written only when the shell exits.

What am I missing?


Ah, my mistake! I need one more option:

setopt -o incappendhistory

With this, it works.

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.