diff options
author | Guillaume Pasquet <dev@bitimplosion.com> | 2017-08-18 09:58:28 +0100 |
---|---|---|
committer | Guillaume Pasquet <dev@bitimplosion.com> | 2017-08-18 09:58:28 +0100 |
commit | 21ee17afb76219d6e04050e0470aabcc8d4f8131 (patch) | |
tree | d194b739aa5352816d3bf37579fdb9e168c136b5 | |
parent | 69346e8bc81cbb73d39b1e4135cc51183702ab04 (diff) |
Added shorthand to create/load env with current folder name
-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 |