2020-05-20 20:05:33 +03:00
|
|
|
function _tide_item_status
|
2021-10-01 07:18:16 +03:00
|
|
|
if string match --quiet --invert 0 $_tide_pipestatus # If there is a failure anywhere in the pipestatus
|
|
|
|
if test "$_tide_pipestatus" = 1 # If simple failure
|
2021-11-25 02:45:48 +03:00
|
|
|
contains character $_tide_left_items || tide_status_bg_color=$tide_status_bg_color_failure \
|
2021-07-03 21:24:29 +03:00
|
|
|
tide_status_color=$tide_status_color_failure _tide_print_item status $tide_status_icon_failure' ' 1
|
2020-07-03 20:27:10 +03:00
|
|
|
else
|
2021-12-05 06:25:40 +03:00
|
|
|
fish_status_to_signal $_tide_pipestatus | string replace SIG '' | string join '|' | read -l out
|
|
|
|
test $_tide_status = 0 && _tide_print_item status $tide_status_icon' ' $out ||
|
|
|
|
tide_status_bg_color=$tide_status_bg_color_failure tide_status_color=$tide_status_color_failure \
|
|
|
|
_tide_print_item status $tide_status_icon_failure' ' $out
|
2020-11-25 01:30:45 +03:00
|
|
|
end
|
2021-11-25 02:45:48 +03:00
|
|
|
else if not contains character $_tide_left_items
|
2021-07-07 01:41:52 +03:00
|
|
|
_tide_print_item status $tide_status_icon
|
2020-05-13 22:46:42 +03:00
|
|
|
end
|
2021-03-02 20:46:40 +03:00
|
|
|
end
|