mirror of
https://github.com/IlanCosman/tide.git
synced 2024-12-26 13:31:42 +03:00
13 lines
458 B
Fish
13 lines
458 B
Fish
function _tide_item_virtual_env
|
|
if set -q VIRTUAL_ENV
|
|
set_color $tide_virtual_env_color
|
|
|
|
set -l splitVirtualEnv (string split '/' "$VIRTUAL_ENV")
|
|
|
|
if test "$tide_virtual_env_display" = 'projectName'
|
|
printf '%s' {$tide_virtual_env_icon}' ' $splitVirtualEnv[-2]
|
|
else if test "$tide_virtual_env_display" = 'venvName'
|
|
printf '%s' {$tide_virtual_env_icon}' ' $splitVirtualEnv[-1]
|
|
end
|
|
end
|
|
end |