Terminal gets bash to go through an elaborate dance to keep separate histories for each tab. Normally (for me anyway) after a restart of Mac OS these separate histories are lost and you are left with just one.
At one time (years ago) the separate histories survived a reboot (much to my delight) but after yet another OS upgrade it went back to the old behavior.
Over the intervening period I have done sporadic searches trying to find out if I imagined this and what the expected behaviour is but turned up nothing useful.
So, was I imagining this and if not how do I get terminal to preserve individual histories between reboots/logouts?
There is this post which I think addresses the same issue but the answer is bit cryptic for me and it isn't clear where you should add the trap
command. Although it may explain why the behaviour comes and goes if that trap
is at the in /etc/bashrc_Apple_Terminal
and then another OS release comes along without it!
/etc/bashrc_Apple_Terminal
that contains atrap
is the very last line:trap shell_session_update EXIT
. The answer implies substitutingHUP
forEXIT
may have helped, but as you've noted, it may be version-dependent. There's also a suggestion in that Q&A that how Terminal is terminated (exit
vs. Command-Q) is relevant. ChangingEXIT
toHUP
is worth a try IMHO (easy & easily restored) - see what happens.