2021-04-23 23:58:28 +03:00
|
|
|
function _tide_print_item -a item
|
2021-09-22 22:28:26 +03:00
|
|
|
var=tide_"$item"_bg_color set -f item_bg_color $$var
|
2021-04-23 23:58:28 +03:00
|
|
|
|
2021-09-22 22:28:26 +03:00
|
|
|
if set -e _tide_last_item_was_newline
|
2021-05-12 23:13:51 +03:00
|
|
|
set_color $item_bg_color -b normal
|
2021-09-22 22:28:26 +03:00
|
|
|
var=tide_"$_tide_side"_prompt_prefix echo -ns $$var
|
2021-05-12 23:13:51 +03:00
|
|
|
else if test "$item_bg_color" = "$_tide_previous_bg_color"
|
2021-05-20 18:46:39 +03:00
|
|
|
set_color $tide_prompt_color_separator_same_color
|
2021-09-22 22:28:26 +03:00
|
|
|
var=tide_"$_tide_side"_prompt_separator_same_color echo -ns $$var
|
|
|
|
else if test "$_tide_side" = left
|
|
|
|
set_color $_tide_previous_bg_color -b $item_bg_color
|
|
|
|
echo -ns $tide_left_prompt_separator_diff_color
|
2021-04-23 23:58:28 +03:00
|
|
|
else
|
2021-05-12 23:13:51 +03:00
|
|
|
set_color $item_bg_color -b $_tide_previous_bg_color
|
2021-09-08 20:54:31 +03:00
|
|
|
echo -ns $tide_right_prompt_separator_diff_color
|
2021-04-23 23:58:28 +03:00
|
|
|
end
|
|
|
|
|
2021-09-22 22:28:26 +03:00
|
|
|
var=tide_"$item"_color set_color $$var -b $item_bg_color
|
2021-04-23 23:58:28 +03:00
|
|
|
|
2021-09-07 22:51:00 +03:00
|
|
|
if test "$tide_prompt_pad_items" = true
|
2021-09-08 20:54:31 +03:00
|
|
|
echo -ns ' ' $argv[2..] ' '
|
2021-04-26 23:27:02 +03:00
|
|
|
else
|
2021-09-08 20:54:31 +03:00
|
|
|
echo -ns $argv[2..]
|
2021-04-26 23:27:02 +03:00
|
|
|
end
|
2021-04-23 23:58:28 +03:00
|
|
|
|
2021-05-12 23:13:51 +03:00
|
|
|
set -g _tide_previous_bg_color $item_bg_color
|
2021-04-23 23:58:28 +03:00
|
|
|
end
|