Try a very basic 'workon' like virtualenvwrapper.

This commit is contained in:
Julien Palard 2017-04-20 23:02:27 +02:00
parent 2f7b43fced
commit c9edfb129b
1 changed files with 8 additions and 0 deletions

View File

@ -246,3 +246,11 @@ if [ -f ~/.git-prompt.sh ]
then
source ~/.git-prompt.sh
fi
function workon
{
local VENVS="$HOME/.venvs"
[ -d "$VENVS/$1" ] || mkdir -p "$VENVS/$1"
[ -f "$VENVS/$1/bin/activate" ] || python3 -m venv "$VENVS/$1"
. "$VENVS/$1/bin/activate"
}