tide/functions/_tide_item_virtual_env.fish
2020-09-07 12:00:54 -07:00

13 lines
464 B
Fish

function _tide_item_virtual_env
if set -q VIRTUAL_ENV
set -l splitVirtualEnv (string split '/' "$VIRTUAL_ENV")
set_color $tide_virtual_env_color
if test "$tide_virtual_env_display_mode" = 'projectName'
printf '%s' $tide_virtual_env_icon' ' $splitVirtualEnv[-2]
else if test "$tide_virtual_env_display_mode" = 'venvName'
printf '%s' $tide_virtual_env_icon' ' $splitVirtualEnv[-1]
end
end
end