diff options
-rwxr-xr-x | venvworkon.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/venvworkon.sh b/venvworkon.sh index 9dcd85c..d714936 100755 --- a/venvworkon.sh +++ b/venvworkon.sh @@ -18,6 +18,11 @@ workon() { envdir="$WORKON_HOME/$1" + if [ "$1" == "." ]; then + target=$(basename `pwd`) + envdir="$WORKON_HOME/$target" + fi + # Creates virtual env if doesn't exists if [ ! -e "$envdir" ]; then python3 -m venv $envdir |