mirror of
https://github.com/IlanCosman/tide.git
synced 2024-11-23 08:46:51 +03:00
Add virtual_env item (#9)
This commit is contained in:
parent
4e4946ecaf
commit
d5cf25d044
12
functions/_tide_item_virtual_env.fish
Normal file
12
functions/_tide_item_virtual_env.fish
Normal file
@ -0,0 +1,12 @@
|
||||
function _tide_item_virtual_env
|
||||
if set -q VIRTUAL_ENV
|
||||
if test "$tide_virtual_env_display" = 'projectName'
|
||||
set output (basename (string split -r -m1 '/' "$VIRTUAL_ENV")[1])
|
||||
else if test "$tide_virtual_env_display" = 'venvName'
|
||||
set output (basename "$VIRTUAL_ENV")
|
||||
end
|
||||
|
||||
set_color $tide_virtual_env_color
|
||||
printf '%s ' "$tide_virtual_env_icon $output"
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user