There's two scenarios to guard against: (1) getting loaded more than once during the session, (2) infinite recursion. The original code handled (1), but not (2). The fix from mhmurray handled (2), but not (1). This version should handle both.
Basically, set the variable first then source bashrc_once, and that's it; don't unset it.
There's two scenarios to guard against: (1) getting loaded more than once during the session, (2) infinite recursion. The original code handled (1), but not (2). The fix from mhmurray handled (2), but not (1). This version should handle both.
Basically, set the variable first then source bashrc_once, and that's it; don't unset it.
Resolves #1.