Skip to content

Instantly share code, notes, and snippets.

@dahlia
Created December 9, 2014 19:18
Show Gist options
  • Save dahlia/a430965d2756eb5bbcc9 to your computer and use it in GitHub Desktop.
Save dahlia/a430965d2756eb5bbcc9 to your computer and use it in GitHub Desktop.
Autoactivate virtualenv
if [[ "$PWD" == "$PROJECT_HOME"* ]]; then
for project in "$WORKON_HOME/"*/; do
if [[ "$(cat $project/.project)" == "$PWD" ]]; then
source "$project"bin/activate
break
fi
done
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment