2020-05-20 20:05:33 +03:00
|
|
|
function _tide_item_prompt_char
|
2021-03-26 17:33:52 +03:00
|
|
|
if test $_tide_last_status = 0
|
2020-05-19 21:01:01 +03:00
|
|
|
set_color $tide_prompt_char_success_color
|
2020-05-15 07:53:37 +03:00
|
|
|
else
|
2020-05-19 21:01:01 +03:00
|
|
|
set_color $tide_prompt_char_failure_color
|
2020-05-15 07:53:37 +03:00
|
|
|
end
|
2020-09-20 05:30:12 +03:00
|
|
|
|
2021-03-02 20:46:40 +03:00
|
|
|
if test "$fish_key_bindings" = fish_default_key_bindings
|
2021-03-17 21:39:03 +03:00
|
|
|
printf '%s' $tide_prompt_char_icon
|
2020-09-20 05:30:12 +03:00
|
|
|
else
|
|
|
|
switch $fish_bind_mode
|
|
|
|
case default
|
2021-03-17 21:39:03 +03:00
|
|
|
printf '%s' $tide_prompt_char_vi_default_icon
|
2020-09-20 05:30:12 +03:00
|
|
|
case insert
|
2021-03-17 21:39:03 +03:00
|
|
|
printf '%s' $tide_prompt_char_vi_insert_icon
|
2020-09-20 05:30:12 +03:00
|
|
|
case replace replace_one
|
2021-03-17 21:39:03 +03:00
|
|
|
printf '%s' $tide_prompt_char_vi_replace_icon
|
2020-09-20 05:30:12 +03:00
|
|
|
case visual
|
2021-03-17 21:39:03 +03:00
|
|
|
printf '%s' $tide_prompt_char_vi_visual_icon
|
2020-09-20 05:30:12 +03:00
|
|
|
end
|
|
|
|
end
|
2021-01-01 07:14:55 +03:00
|
|
|
end
|