Improve python virtual environment support (uv).
Some checks failed
Makefile CI / build (push) Has been cancelled

This commit is contained in:
Doncho Gunchev 2025-02-15 23:47:35 +02:00
parent df3199976e
commit 86034e3f02
No known key found for this signature in database
GPG key ID: D3FF0619433A66E2
2 changed files with 5 additions and 6 deletions

View file

@ -81,11 +81,7 @@ function prompt_command() {
local prompt="--($my_D, Err ${my_P[*]}, $my_TTY)---($PWD)--"
if [ -n "${VIRTUAL_ENV:-}" ] && [ -n "$_OLD_VIRTUAL_PS1" ]; then
if [ -n "$VIRTUAL_ENV_PROMPT" ]; then
export my_VENV="$VIRTUAL_ENV_PROMPT"
else
export my_VENV="${VIRTUAL_ENV##*/}"
fi
export my_VENV="${VIRTUAL_ENV##*/}"
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.