From 61ade4610cb8976b91c379c6c95bb4f9064bedad Mon Sep 17 00:00:00 2001 From: Ceda EI Date: Sun, 14 Feb 2021 16:31:18 +0530 Subject: [PATCH] Use parent directory name if the pwd is .venv --- plugins/python_venv.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/python_venv.sh b/plugins/python_venv.sh index c57e9bc..65a793b 100644 --- a/plugins/python_venv.sh +++ b/plugins/python_venv.sh @@ -13,7 +13,7 @@ function wish_python_venv_set_colors() { function wish_python_venv_main() { if [[ -v VIRTUAL_ENV ]]; then - local venv=$(echo $VIRTUAL_ENV | sed 's|.*/||') + local venv=$(echo $VIRTUAL_ENV | sed ';s|/.venv$||;s|.*/||') wish_append $WISH_PYTHON_VENV_BG $WISH_PYTHON_VENV_FG " $venv " else wish_append $WISH_PYTHON_VENV_BG $WISH_PYTHON_VENV_FG ""