Created
November 9, 2012 03:54
-
-
Save jjb/4043594 to your computer and use it in GitHub Desktop.
putting .bin in PATH only when there is a Gemfile present
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function chpwd { | |
if [ -r $PWD/Gemfile ]; then | |
export PATH=./bin:${PATH//\.\/bin:} | |
else | |
regexp-replace PATH '\./bin:' '' | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment