mirror of
https://gitlab.com/ceda_ei/wish
synced 2025-04-01 22:06:53 +02:00
Use parent directory name if the pwd is .venv
This commit is contained in:
parent
4b9c2b6982
commit
61ade4610c
@ -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 ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user