6

By that I mean what people do in bash this way:
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
That is, when I run a command echo test1 in one shell, and then press Up in another one, I see echo test1. (To be precise, one has to press Enter before Up for it to work...