How do you get your .bashrc file to exit on the first error in the script without inheriting the errexit setting into the interactive bash shell?
# my .bashrc
set -o errexit
# do something bad
sdgjsghsdjksjkghsdfg sdghsdfkjhgskg sgsdfgs
I thought I was clever by setting "errexit" in my .bashrc so it would exit on the first error.
...But, It doesn't work! ... because after .bashrc exits, your shell window disappears like its crashing every time an error occurs on the command line. Just typing "grep" without any arguments causes bash shell and terminal window to close....
how to get .bashrc to exit on the first error without undesirable effects of blowing up your terminal window on every error you type on the command line?