tide/functions/_tide_item_prompt_char.fish
Peng Guanwen fb22b3bec9
Set color to normal at end of prompt (#63)
* Set color to normal at end of prompt char

* move `set_color normal` to _tide_prompt
2020-12-31 20:14:55 -08:00

23 lines
736 B
Fish

function _tide_item_prompt_char
if test $_tide_last_pipestatus[-1] -eq 0
set_color $tide_prompt_char_success_color
else
set_color $tide_prompt_char_failure_color
end
if test "$fish_key_bindings" = 'fish_default_key_bindings'
printf '%s' $tide_prompt_char_icon' '
else
switch $fish_bind_mode
case default
printf '%s' $tide_prompt_char_vi_default_icon' '
case insert
printf '%s' $tide_prompt_char_vi_insert_icon' '
case replace replace_one
printf '%s' $tide_prompt_char_vi_replace_icon' '
case visual
printf '%s' $tide_prompt_char_vi_visual_icon' '
end
end
end