Created
January 6, 2014 16:36
-
-
Save spulec/8285482 to your computer and use it in GitHub Desktop.
Auto activate virtualenvs in new terminal windows.
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
# If we are in a Development folder, we're probably in a virtual env. Try to activate it based on our CWD. | |
IN=$PWD | |
if [[ "$IN" == */Development/* ]] | |
then | |
arrIN=(${IN//// }) | |
# This assumes Development is the third token and your project directory is the fourth | |
workon ${arrIN[3]} | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment