2019-05-16 04:17:05 +00:00
|
|
|
# shellcheck disable=SC1090
|
|
|
|
|
2019-05-16 03:45:06 +00:00
|
|
|
vactivate() {
|
|
|
|
local path=~/.venv/$1
|
|
|
|
|
|
|
|
if [[ ! -d $path ]]; then
|
2019-05-16 04:17:05 +00:00
|
|
|
python -m venv --prompt "venv: $1" --system-site-packages "$path"
|
2019-05-16 03:45:06 +00:00
|
|
|
fi
|
2019-05-16 04:17:05 +00:00
|
|
|
source "$path"/bin/activate; bash; deactivate
|
2019-05-16 03:45:06 +00:00
|
|
|
}
|