Created
June 7, 2011 23:31
-
-
Save adinardi/1013443 to your computer and use it in GitHub Desktop.
.bash_profile addition for auto virtualenv-ing
This file contains 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
# 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