Skip to content

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

Open
gaelicWizard wants to merge 2 commits intojosephwecker:masterfrom
gaelicWizard:RANONCE
Open

Make sure not to *un*-set the guard variable#8
gaelicWizard wants to merge 2 commits intojosephwecker:masterfrom
gaelicWizard:RANONCE

Conversation

@gaelicWizard
Copy link

@gaelicWizard gaelicWizard commented Jun 28, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incompatible with bash_completion from Homebrew

2 participants