3 ms·
I use this to have all shells share a history concurrently - which sometimes is confusing if you press "↑" and have an unexpected (possibly dangerous command) b
by Klasiaster 7y ago
I use this to have all shells share a history concurrently - which sometimes is confusing if you press "↑" and have an unexpected (possibly dangerous command) but I'm used to it now:
shopt -s histappend
PROMPT_COMMAND="history -a; history -c; history -r"
See more about it here: https://unix.stackexchange.com/questions/1288/preserve-bash-history-in-multiple-terminal-windows https://unix.stackexchange.com/questions/1288/preserve-bash-...