tide/functions/_tide_right_prompt.fish

21 lines
616 B
Fish
Raw Normal View History

2020-05-20 20:05:33 +03:00
function _tide_right_prompt
2021-04-25 03:40:43 +03:00
set -g _tide_which_side_working_on right
2020-06-26 22:02:40 +03:00
for item in $tide_right_prompt_items
2021-03-02 20:46:40 +03:00
if test "$item" = newline
2020-11-25 07:41:24 +03:00
set_color $previousColor -b normal
printf '%s' $tide_right_prompt_suffix\n
2021-04-25 03:40:43 +03:00
set -g tide_last_item newline
2020-11-25 07:41:24 +03:00
else
2021-04-25 03:40:43 +03:00
_tide_item_$item
2020-06-26 22:02:40 +03:00
end
2020-05-09 01:32:58 +03:00
end
2020-06-26 22:02:40 +03:00
2021-04-25 03:42:12 +03:00
if test "$tide_last_item" != newline -a "$tide_last_item" != character
2021-04-25 03:40:43 +03:00
set_color $tide_previous_bg_color -b normal
2020-07-05 21:34:01 +03:00
printf '%s' $tide_right_prompt_suffix
end
set_color normal # Make sure there is something printed on the last line
2020-05-15 07:53:37 +03:00
end