Bash subshell in Terminal has Mac OS's session save enabled
Solution 1:
I’m not certain when this became the default, but I agree, it’s an annoying default; it was added in one of the last few major releases. I came across this question because I was searching for how to best disable this, and I think you may have provided the solution yourself:
In /etc/bashrc_Apple_Terminal
, there is great amount of documentation about how the functionality in the file is implemented.
The final comment is the kicker:
# The save/restore mechanism is disabled if the following file exists:
#
# ~/.bash_sessions_disable
I tested this on my machine and it works, no more session saving.