bashrc: fancier prompt termination logic