bashrc_dispatch icon indicating copy to clipboard operation
bashrc_dispatch copied to clipboard

Make sure not to *un*-set the guard variable

Open gaelicWizard opened this issue 4 years ago • 0 comments

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.

gaelicWizard avatar Jun 28 '21 21:06 gaelicWizard