Created
July 17, 2012 23:37
-
-
Save elijahr/3132934 to your computer and use it in GitHub Desktop.
work on virtualenv
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
#### automatically activate virtualenvs - from http://toranbillups.com/blog/archive/2012/4/22/Automatically-activate-your-virtualenv | |
workon_virtualenv() { | |
if [ -e "${PWD}/pyenv" ]; then | |
deactivate >/dev/null 2>&1 | |
source "${PWD}/pyenv/bin/activate" | |
fi | |
} | |
virtualenv_cd() { | |
cd "$@" && workon_virtualenv | |
} | |
alias cd="virtualenv_cd" | |
# if there is a virtualenv in the cwd, activate it | |
workon_virtualenv | |
#### / |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment