bashrc: save history after each command finishes