I don't get it, isn't your bash history already logged to `.bash_history`? What's the point of using PROMPT_COMMAND to send it in addition to another file?
Excellent question! Multiple tabs will squash each other, losing history from Tab B between when tab A was opened and when tab A was closed. It's actually an insecure default - 'insecure' as in, it's a minor form of data loss. Then again, so is bash launching scripts without pipefail, variable expansion fail, etc. It'd be worth fixing all this stuff in the next major bash version.
histappend