mirror of
https://github.com/IlanCosman/tide.git
synced 2024-09-11 17:15:34 +03:00
Fix status spacing with no icon
This commit is contained in:
parent
54b18da465
commit
11263702a2
@ -13,14 +13,13 @@ function _tide_item_status
|
||||
if test $_tide_last_status -eq 0
|
||||
set -g tide_status_bg_color $tide_status_success_bg_color
|
||||
set_color $tide_status_success_color
|
||||
printf '%s' $tide_status_success_icon
|
||||
printf '%s' {$tide_status_success_icon}' '
|
||||
else
|
||||
set -g tide_status_bg_color $tide_status_failure_bg_color
|
||||
set_color $tide_status_failure_color
|
||||
printf '%s' $tide_status_failure_icon
|
||||
printf '%s' {$tide_status_failure_icon}' '
|
||||
end
|
||||
|
||||
printf '%s' ' '
|
||||
__fish_pipestatus_with_signal $_tide_last_pipestatus | string replace 'SIG' '' | string join '|'
|
||||
else if test "$tide_status_always_display_icon" = 'true'
|
||||
set -g tide_status_bg_color $tide_status_success_bg_color
|
||||
|
@ -11,16 +11,16 @@ set -g tide_status_always_display_icon false
|
||||
|
||||
@test 'true' (true; _status) -z
|
||||
@test 'false' (false; _status) -z
|
||||
@test 'true|false' (true|false; _status) = "$tide_status_failure_icon 0|1"
|
||||
@test 'true|false' (true|false; _status) = {$tide_status_failure_icon} '0|1'
|
||||
@test 'true|true' (true|true; _status) -z
|
||||
@test 'false|true' (false|true; _status) = "$tide_status_success_icon 1|0"
|
||||
@test 'false|false' (false|false; _status) = "$tide_status_failure_icon 1|1"
|
||||
@test 'false|true' (false|true; _status) = {$tide_status_success_icon} '1|0'
|
||||
@test 'false|false' (false|false; _status) = {$tide_status_failure_icon} '1|1'
|
||||
|
||||
set -g tide_status_always_display_icon true
|
||||
|
||||
@test 'true' (true; _status) = "$tide_status_success_icon"
|
||||
@test 'false' (false; _status) = "$tide_status_failure_icon 1"
|
||||
@test 'true|false' (true|false; _status) = "$tide_status_failure_icon 0|1"
|
||||
@test 'true|true' (true|true; _status) = "$tide_status_success_icon"
|
||||
@test 'false|true' (false|true; _status) = "$tide_status_success_icon 1|0"
|
||||
@test 'false|false' (false|false; _status) = "$tide_status_failure_icon 1|1"
|
||||
@test 'true' (true; _status) = {$tide_status_success_icon}
|
||||
@test 'false' (false; _status) = {$tide_status_failure_icon} '1'
|
||||
@test 'true|false' (true|false; _status) = {$tide_status_failure_icon} '0|1'
|
||||
@test 'true|true' (true|true; _status) = {$tide_status_success_icon}
|
||||
@test 'false|true' (false|true; _status) = {$tide_status_success_icon} '1|0'
|
||||
@test 'false|false' (false|false; _status) = {$tide_status_failure_icon} '1|1'
|
Loading…
Reference in New Issue
Block a user