Created
July 5, 2016 20:07
-
-
Save belljustin/5cfb426916bcfa284443930edecc259e to your computer and use it in GitHub Desktop.
Source virtual env on directory change
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
| cd () { | |
| builtin cd $1 | |
| if [ -d ".env" ] ; then | |
| source .env/bin/activate | |
| elif [ -d "env" ] ; then | |
| source env/bin/activate | |
| fi | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment