PyCharm virtual environment with poetry support.

This commit is contained in:
Doncho Gunchev 2024-07-16 15:29:37 +03:00
parent 6271df868c
commit 2f07d57c86
No known key found for this signature in database
GPG key ID: D3FF0619433A66E2

View file

@ -81,7 +81,11 @@ function prompt_command() {
local prompt="--($my_D, Err ${my_P[*]}, $my_TTY)---($PWD)--"
if [ -n "${VIRTUAL_ENV:-}" ] && [ -n "$_OLD_VIRTUAL_PS1" ]; then
export my_VENV="${VIRTUAL_ENV##*/}"
if [ -n "$VIRTUAL_ENV_PROMPT" ]; then
export my_VENV="$VIRTUAL_ENV_PROMPT"
else
export my_VENV="${VIRTUAL_ENV##*/}"
fi
prompt="--($my_D, Err ${my_P[*]}, $my_TTY, $my_VENV)---($PWD)--"
if [ "${PS1:0:${#my_VENV}+3}" == "($my_VENV) " ]; then
# PS1 will be restored by virtual environment's deactivate script.