Created
April 30, 2015 21:22
-
-
Save devmanhinton/b360be3595e8f3599074 to your computer and use it in GitHub Desktop.
Auto Start ClassPath virtualenv
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
This is for zsh so you might have to change for other shells but general idea is the same | |
Note: Change 'ClassPath' to the root of your project | |
chpwd () { | |
case $PWD in | |
*ClassPath*) | |
python -c 'import sys; print sys.real_prefix' 2>/dev/null 1>/dev/null || source bin/activate | |
esac | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment