4 ms·
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
by reptation 10y 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".
- SEJeff 10y agosomething other than: shopt -s histappend Isn't that exactly what that shell option does?
- LukeShu 10y agoThat 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'