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
# The use_env call below is a reusable command to activate/create a new Python | |
# virtualenv, requiring only a single declarative line of code in your .env files. | |
# It only performs an action if the requested virtualenv is not the current one. | |
use_env() { | |
typeset venv | |
venv="$1" | |
if [[ "${VIRTUAL_ENV##*/}" != "$venv" ]]; then | |
if workon | grep -q "$venv"; then | |
workon "$venv" | |
else |
NewerOlder