Remove basename in virtual_env item

This commit is contained in:
Ilan Cosman 2020-07-09 17:34:15 -07:00
parent 6d145ea53c
commit bb129150f8

View File

@ -4,10 +4,12 @@ function _tide_item_virtual_env
printf '%s' {$tide_virtual_env_icon}' '
set -l splitVirtualEnv (string split '/' "$VIRTUAL_ENV")
if test "$tide_virtual_env_display" = 'projectName'
basename (string split -r -m1 '/' "$VIRTUAL_ENV")[1]
printf '%s' $splitVirtualEnv[-2]
else if test "$tide_virtual_env_display" = 'venvName'
basename "$VIRTUAL_ENV"
printf '%s' $splitVirtualEnv[-1]
end
end
end