Skip to content

Instantly share code, notes, and snippets.

@jjb
Created November 9, 2012 03:54
Show Gist options
  • Save jjb/4043594 to your computer and use it in GitHub Desktop.
Save jjb/4043594 to your computer and use it in GitHub Desktop.
putting .bin in PATH only when there is a Gemfile present
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