Skip to content

Instantly share code, notes, and snippets.

@stefanv
Created June 4, 2019 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefanv/54d1a0d72607d38bfb4748fdb506f646 to your computer and use it in GitHub Desktop.
Save stefanv/54d1a0d72607d38bfb4748fdb506f646 to your computer and use it in GitHub Desktop.
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