registrar bash_history inmediatamente

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