3 ms·
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?
by jrochkind1 10y ago
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?
- nailer 10y agoExcellent 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.
- jlgaddis 10y agocf. histappend
- outworlder 10y agoIf you can use it, zsh does not have that issue. Plus a bunch of other goodies. It's been a while since I've last used bash.