At first this was a bit funny, like playing "Bash Roulette" ...but now it's getting old lol
Any command in my terminal that exits with non-zero code closes my terminal window
I was told that perhaps I have set -e
set in some bash script somewhere that my terminal sources.
I have checked .bash_profile
/ .bashrc
/ .profile
and it doesn't look like set -e
is in there.
Would there be any other obvious culprits?
set +e
, does it repair the problem? If so, which I assume, then you need to keep looking for thatset -e
. It could be in the global versions of these files under/etc
, or in any other script sourced from them. Move your config files away, if the problem is fixed then add back the lines in smaller chunks to see where it breaks.PS4=' ${BASH_SOURCE}:$LINENO: ' bash -lixc true |& grep -e set -e trap
could be informative.-
like so:echo $-
.set +e
does not fix the problem?