It is assumed that all virtualenv directories are shared by .venv.
.zshrc
alias ve='source ./.venv/bin/activate'
vec() {
PWD_FOR_VE_CREATE=`pwd`
virtualenv ./.venv --prompt='('`basename $PWD_FOR_VE_CREATE`')'
}
Type vec to create a virtualenv directory (.venv) with the prompt name set to the name of the current directory.
When you type ve, source ./.venv/bin/activate is executed and virtualenv is enabled ninarimasu.
Recommended Posts