Hacker News new | ask | show | jobs
by reptation 3671 days ago
the difference is that the author's version backs up every command to a file as it happens. If you have multiple terminals open, you do not get the same output running "history".
1 comments

something other than:

    shopt -s histappend
Isn't that exactly what that shell option does?
That does make multiple terminals play nice with eachother, but it's still different, as OP's still flushes to HISTFILE after every command. But, then we can do that with

    PROMPT_COMMAND='history -a'