bashrc_dispatch
bashrc_dispatch copied to clipboard
Make sure not to *un*-set the guard variable
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.