From 006bd89b60ab5628cda0a7719f836594896a046c Mon Sep 17 00:00:00 2001 From: Ilan Cosman Date: Sun, 28 Nov 2021 12:30:45 -0800 Subject: [PATCH] Rename var --- functions/_tide_item_newline.fish | 2 +- functions/_tide_print_item.fish | 2 +- functions/_tide_prompt.fish | 8 ++++---- .../tide/configure/functions/_fake_tide_item_newline.fish | 2 +- .../tide/configure/functions/_fake_tide_print_item.fish | 2 +- functions/tide/configure/functions/_fake_tide_prompt.fish | 8 ++++---- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/functions/_tide_item_newline.fish b/functions/_tide_item_newline.fish index 3a74425..7948bbd 100644 --- a/functions/_tide_item_newline.fish +++ b/functions/_tide_item_newline.fish @@ -1,5 +1,5 @@ function _tide_item_newline set_color $prev_bg_color -b normal var=tide_"$_tide_side"_prompt_suffix echo $$var - set -g prev_item_was_newline + set -g add_prefix end diff --git a/functions/_tide_print_item.fish b/functions/_tide_print_item.fish index 85d9fc6..3a3f333 100644 --- a/functions/_tide_print_item.fish +++ b/functions/_tide_print_item.fish @@ -1,7 +1,7 @@ function _tide_print_item -a item var=tide_"$item"_bg_color set -f item_bg_color $$var - if set -e prev_item_was_newline + if set -e add_prefix set_color $item_bg_color -b normal var=tide_"$_tide_side"_prompt_prefix echo -ns $$var else if test "$item_bg_color" = "$prev_bg_color" diff --git a/functions/_tide_prompt.fish b/functions/_tide_prompt.fish index de130e3..59c483c 100644 --- a/functions/_tide_prompt.fish +++ b/functions/_tide_prompt.fish @@ -1,18 +1,18 @@ function _tide_prompt - set -g prev_item_was_newline + set -g add_prefix _tide_side=left set -f left (for item in $_tide_left_items _tide_item_$item end - if not set -e prev_item_was_newline + if not set -e add_prefix set_color $prev_bg_color -b normal echo -ns $tide_left_prompt_suffix end) - set -g prev_item_was_newline + set -g add_prefix _tide_side=right set -f right (for item in $_tide_right_items _tide_item_$item end - if not set -e prev_item_was_newline + if not set -e add_prefix set_color $prev_bg_color -b normal echo -ns $tide_right_prompt_suffix end) diff --git a/functions/tide/configure/functions/_fake_tide_item_newline.fish b/functions/tide/configure/functions/_fake_tide_item_newline.fish index 489e1f8..c614bab 100644 --- a/functions/tide/configure/functions/_fake_tide_item_newline.fish +++ b/functions/tide/configure/functions/_fake_tide_item_newline.fish @@ -1,5 +1,5 @@ function _fake_tide_item_newline set_color $prev_bg_color -b normal var=fake_tide_"$_fake_tide_side"_prompt_suffix echo $$var - set -g prev_item_was_newline + set -g add_prefix end diff --git a/functions/tide/configure/functions/_fake_tide_print_item.fish b/functions/tide/configure/functions/_fake_tide_print_item.fish index d3422c9..30cd024 100644 --- a/functions/tide/configure/functions/_fake_tide_print_item.fish +++ b/functions/tide/configure/functions/_fake_tide_print_item.fish @@ -1,7 +1,7 @@ function _fake_tide_print_item -a item var=fake_tide_"$item"_bg_color set -f item_bg_color $$var - if set -e prev_item_was_newline + if set -e add_prefix set_color $item_bg_color -b normal var=fake_tide_"$_fake_tide_side"_prompt_prefix echo -ns $$var else if test "$item_bg_color" = "$prev_bg_color" diff --git a/functions/tide/configure/functions/_fake_tide_prompt.fish b/functions/tide/configure/functions/_fake_tide_prompt.fish index 0e6ccb7..1238995 100644 --- a/functions/tide/configure/functions/_fake_tide_prompt.fish +++ b/functions/tide/configure/functions/_fake_tide_prompt.fish @@ -1,18 +1,18 @@ function _fake_tide_prompt - set -g prev_item_was_newline + set -g add_prefix _fake_tide_side=left set -f left (for item in $fake_tide_left_prompt_items _fake_tide_item_$item end - if not set -e prev_item_was_newline + if not set -e add_prefix set_color $prev_bg_color -b normal echo -ns $fake_tide_left_prompt_suffix end) - set -g prev_item_was_newline + set -g add_prefix _fake_tide_side=right set -f right (for item in $fake_tide_right_prompt_items _fake_tide_item_$item end - if not set -e prev_item_was_newline + if not set -e add_prefix set_color $prev_bg_color -b normal echo -ns $fake_tide_right_prompt_suffix end)