Created
June 4, 2019 20:29
-
-
Save stefanv/54d1a0d72607d38bfb4748fdb506f646 to your computer and use it in GitHub Desktop.
This file contains 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
function workon { | |
ENVS=${HOME}/envs | |
TARGET=$ENVS/${1} | |
if [[ -z ${1} || ! -d $TARGET ]]; then | |
echo "Invalid environment. Choose from:" | |
ls $ENVS | |
else | |
unset PYTHONPATH | |
source $TARGET/bin/activate | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment