mirror of
https://github.com/IlanCosman/tide.git
synced 2024-09-11 17:15:34 +03:00
Add tide_status_always_display_icon
This commit is contained in:
parent
7b97aa96a8
commit
a7564fac27
@ -1,16 +1,16 @@
|
||||
function _tide_item_status
|
||||
if string match -q --invert '0' $_tide_last_pipestatus
|
||||
set -l fishPipestatusWithSignal (__fish_pipestatus_with_signal $_tide_last_pipestatus)
|
||||
|
||||
if test (count $_tide_last_pipestatus) -gt 1 || string match -qe 'SIG' $fishPipestatusWithSignal
|
||||
if test $_tide_last_status -eq 0
|
||||
set_color $tide_status_success_color
|
||||
printf '%s ' {$tide_status_success_icon}
|
||||
else
|
||||
set_color $tide_status_failure_color
|
||||
printf '%s ' {$tide_status_failure_icon}
|
||||
end
|
||||
string replace 'SIG' '' $fishPipestatusWithSignal | string join '|'
|
||||
if string match -q --invert '0' $_tide_last_pipestatus # If there is a failure somewhere in the pipestatus
|
||||
if test $_tide_last_status -eq 0
|
||||
set_color $tide_status_success_color
|
||||
printf '%s' {$tide_status_success_icon}' '
|
||||
else
|
||||
set_color $tide_status_failure_color
|
||||
printf '%s' {$tide_status_failure_icon}' '
|
||||
end
|
||||
|
||||
__fish_pipestatus_with_signal $_tide_last_pipestatus | string replace -a 'SIG' '' | string join '|'
|
||||
else if test "$tide_status_always_display_icon" = 'true'
|
||||
set_color $tide_status_success_color
|
||||
printf '%s' $tide_status_success_icon
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user