return not exit
I was just working up a pull request for this - it caused me some minor grief as suddenly all my terminal windows started closing and it's hard to edit .bash_profile from something other than a termina.
ah yeah, my bad. It is a shell function of course, not a script. Sorry for the inconvenience..
no worries - it was fun exploring the code to find the failure