mirror of
https://github.com/IlanCosman/tide.git
synced 2024-11-26 09:42:51 +03:00
Minor edits
This commit is contained in:
parent
cf1cf8c73e
commit
785abbf045
@ -1,5 +1,5 @@
|
||||
function _tide_item_newline
|
||||
set_color $_tide_previous_bg_color -b normal
|
||||
side_working_on_suffix_name=tide_"$_tide_which_side_working_on"_prompt_suffix echo $$side_working_on_suffix_name
|
||||
side_working_on_suffix_name=tide_"$_tide_side"_prompt_suffix echo $$side_working_on_suffix_name
|
||||
set -g _tide_last_item_was_newline
|
||||
end
|
||||
|
@ -1,29 +1,21 @@
|
||||
function _tide_print_item -a item
|
||||
item_bg_color_name=tide_"$item"_bg_color set item_bg_color $$item_bg_color_name
|
||||
var=tide_"$item"_bg_color set -f item_bg_color $$var
|
||||
|
||||
if test "$_tide_which_side_working_on" = left
|
||||
if set -e _tide_last_item_was_newline
|
||||
set_color $item_bg_color -b normal
|
||||
echo -ns $tide_left_prompt_prefix
|
||||
else if test "$item_bg_color" = "$_tide_previous_bg_color"
|
||||
set_color $tide_prompt_color_separator_same_color
|
||||
echo -ns $tide_left_prompt_separator_same_color
|
||||
else
|
||||
set_color $_tide_previous_bg_color -b $item_bg_color
|
||||
echo -ns $tide_left_prompt_separator_diff_color
|
||||
end
|
||||
else if set -e _tide_last_item_was_newline
|
||||
if set -e _tide_last_item_was_newline
|
||||
set_color $item_bg_color -b normal
|
||||
echo -ns $tide_right_prompt_prefix
|
||||
var=tide_"$_tide_side"_prompt_prefix echo -ns $$var
|
||||
else if test "$item_bg_color" = "$_tide_previous_bg_color"
|
||||
set_color $tide_prompt_color_separator_same_color
|
||||
echo -ns $tide_right_prompt_separator_same_color
|
||||
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
|
||||
else
|
||||
set_color $item_bg_color -b $_tide_previous_bg_color
|
||||
echo -ns $tide_right_prompt_separator_diff_color
|
||||
end
|
||||
|
||||
item_color_name=tide_"$item"_color set_color $$item_color_name -b $item_bg_color
|
||||
var=tide_"$item"_color set_color $$var -b $item_bg_color
|
||||
|
||||
if test "$tide_prompt_pad_items" = true
|
||||
echo -ns ' ' $argv[2..] ' '
|
||||
|
@ -1,6 +1,6 @@
|
||||
function _tide_prompt
|
||||
set -g _tide_last_item_was_newline
|
||||
_tide_which_side_working_on=left set -f left_prompt (for item in $tide_left_prompt_items
|
||||
_tide_side=left set -f left_prompt (for item in $tide_left_prompt_items
|
||||
_tide_item_$item
|
||||
end
|
||||
if not set -e _tide_last_item_was_newline
|
||||
@ -9,7 +9,7 @@ function _tide_prompt
|
||||
end)
|
||||
|
||||
set -g _tide_last_item_was_newline
|
||||
_tide_which_side_working_on=right set -f right_prompt (for item in $tide_right_prompt_items
|
||||
_tide_side=right set -f right_prompt (for item in $tide_right_prompt_items
|
||||
_tide_item_$item
|
||||
end
|
||||
if not set -e _tide_last_item_was_newline
|
||||
|
Loading…
Reference in New Issue
Block a user