mirror of
https://github.com/IlanCosman/tide.git
synced 2024-11-27 13:18:02 +03:00
16 lines
605 B
Fish
16 lines
605 B
Fish
function _tide_git_prompt_set_vars -v tide_git_prompt_bg_color
|
|
switch $tide_git_prompt_bg_color
|
|
case '' 'normal'
|
|
set color ''
|
|
case '*'
|
|
set color (set_color -b $tide_git_prompt_bg_color)
|
|
end
|
|
|
|
set -a vars __fish_git_prompt_char_{cleanstate, dirtystate, invalidstate, stagedstate, stashstate}
|
|
set -a vars __fish_git_prompt_char_{stateseparator, untrackedfiles}
|
|
set -a vars __fish_git_prompt_char_{upstream_ahead, upstream_behind, upstream_diverged, upstream_equal, upstream_prefix}
|
|
|
|
for var in $vars
|
|
set -g _$var $color$$var
|
|
end
|
|
end |