Skip to content

Instantly share code, notes, and snippets.

@adinardi
Created June 7, 2011 23:31
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 adinardi/1013443 to your computer and use it in GitHub Desktop.
Save adinardi/1013443 to your computer and use it in GitHub Desktop.
.bash_profile addition for auto virtualenv-ing
# auto source virtual envs if it can find one
has_virtualenv() {
if [ -e bin/activate ]; then
source bin/activate
fi
}
venv_cd () {
cd "$@" && has_virtualenv
}
alias cd="venv_cd"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment