Skip to content

Instantly share code, notes, and snippets.

@TheLandolorien
Last active July 30, 2021 15:17
Show Gist options
  • Save TheLandolorien/f8a212e26534ce6422ada3dfcabbe7aa to your computer and use it in GitHub Desktop.
Save TheLandolorien/f8a212e26534ce6422ada3dfcabbe7aa to your computer and use it in GitHub Desktop.
Bash PATH Safe Additions
# Add new directories to PATH without duplicating on shell reload
# e.g. `source ~/.bash<SCRIPT_SUFFIX>`
[[ ":$PATH:" =~ ":<PATH_ADDITION>:" ]] || PATH="<PATH_ADDITION>:$PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment