tide/functions/_tide_status.fish

16 lines
674 B
Fish
Raw Normal View History

2020-05-19 06:03:25 +03:00
function _tide_status
if string match -q --invert '0' $last_pipestatus
set -l fishPipestatusWithSignal (__fish_pipestatus_with_signal $last_pipestatus)
if test (count $last_pipestatus) -gt 1 || string match -qe 'SIG' $fishPipestatusWithSignal
if test $last_status -eq 0
2020-05-19 06:03:25 +03:00
set_color $tide_status_success_color
printf '%s ' {$tide_status_success_icon}
else
2020-05-19 06:03:25 +03:00
set_color $tide_status_failure_color
printf '%s ' {$tide_status_failure_icon}
end
2020-05-18 20:06:02 +03:00
printf '%s ' (string join '|' (string replace 'SIG' '' $fishPipestatusWithSignal))
end
end
end