Skip to content

Instantly share code, notes, and snippets.

@pmakholm
Created June 8, 2018 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmakholm/6416e68bff9991ec5b0e10ce9fcbdc9a to your computer and use it in GitHub Desktop.
Save pmakholm/6416e68bff9991ec5b0e10ce9fcbdc9a to your computer and use it in GitHub Desktop.
.bashrc snippet to handle git working tree specific PATH
# .bashrc snippet to handle git working tree specific PATH
REAL_PATH=$PATH
PATH_SUFFIX='$( git rev-parse --git-dir &> /dev/null && echo $(git rev-parse --show-toplevel)/bin: )
PROMPT_COMMAND='eval PATH=$PATH_SUFFIX$REAL_PATH'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment