Rename var

This commit is contained in:
Ilan Cosman 2021-11-28 12:30:45 -08:00
parent 49fd438267
commit 006bd89b60
6 changed files with 12 additions and 12 deletions

View File

@ -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

View File

@ -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"

View File

@ -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)

View File

@ -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

View File

@ -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"

View File

@ -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)