registrar bash_history inmediatamente
shopt -s histappend
PROMPT_COMMAND="history -a;$PROMPT_COMMAND"
Better Bison
shopt -s histappend
PROMPT_COMMAND="history -a;$PROMPT_COMMAND"