I’m a big fan of set -o vi
in bash, and a also of multiple tabbed terminal windows as a way to keep multiple programming/debugging/experimenting contexts active simultaneously.
Nevertheless, it took me almost ten years to take ten minutes to lookup the settings which merge the histories of several terminals in a common file, as opposed to each terminal overwriting the other’s history when exiting.
So here it is, mostly as a note to self:
export HISTSIZE=5000 export HISTCONTROL=ignoredups shopt -s histappend
/me is happy with his big “treasure chest” history file…
Thanks! I didn’t know that.
And thanks from me. I’ve always been annoyed by the overwriting behaviour.
If you’re looking for something similar in tcsh, check out this (it doesn’t just apply to OSX): http://www.macosxhints.com/article.php?story=20070715091413640
Following variable PROMPT_COMMAND=”history -a” forces bash to write all to the HISTFILE immediately and not at the end of the session.
Anyway thanks for ignoredups.