Я попытался настроить подсказку своей виртуальной среды, добавив следующее в свой
Код: Выделить всё
.zshrc
Код: Выделить всё
...
export VIRTUAL_ENV_DISABLE_PROMPT=1
if [[ -v VIRTUAL_ENV ]]; then
PROMPT='%F{green}(venv)%f'$PROMPT
fi
...
Код: Выделить всё
$ source ~/.zshrc
I made it work automatically by adding the aliases below, but I was wondering if there is a better way to make this work automatically?
Код: Выделить всё
alias venv='source ./venv/bin/activate; source ~/.zshrc'
alias deactivate='deactivate; source ~/.zshrc'
Источник: https://stackoverflow.com/questions/781 ... nvironment