Created
August 20, 2015 11:45
-
-
Save matt-snider/e7008035acd903fa84e6 to your computer and use it in GitHub Desktop.
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
# The following will check for a .venv file, and if it exists, | |
# automagically switch to working on that virtualenv. | |
# | |
# https://justin.abrah.ms/python/virtualenv_wrapper_helper.html | |
source /usr/bin/virtualenvwrapper.sh | |
function prompt() | |
{ | |
if [ "$PWD" != "$MYOLDPWD" ]; then | |
MYOLDPWD="$PWD" | |
test -e .venv && workon `cat .venv` | |
fi | |
} | |
PROMPT_COMMAND='prompt' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment