Move _tide_left_prompt and _tide_right_prompt into _tide_prompt

This commit is contained in:
Ilan Cosman 2021-05-04 09:29:34 -07:00
parent bbee4139d0
commit d11073a20a
3 changed files with 32 additions and 30 deletions

View File

@ -1,15 +0,0 @@
function _tide_left_prompt
set -g tide_last_item newline
set -g _tide_which_side_working_on left
for item in $tide_left_prompt_items
_tide_item_$item
end
if test "$tide_last_item" != newline -a "$tide_last_item" != character
set_color $tide_previous_bg_color -b normal
printf '%s' $tide_left_prompt_suffix
end
set_color normal # Make sure there is something printed on the last line
end

View File

@ -33,3 +33,35 @@ function _tide_prompt
set -U $_tide_right_prompt_display_var $rightPrompt[$leftPromptHeight]
printf '%s' $leftPrompt[-1]' '
end
function _tide_left_prompt
set -g tide_last_item newline
set -g _tide_which_side_working_on left
for item in $tide_left_prompt_items
_tide_item_$item
end
if test "$tide_last_item" != newline -a "$tide_last_item" != character
set_color $tide_previous_bg_color -b normal
printf '%s' $tide_left_prompt_suffix
end
set_color normal # Make sure there is something printed on the last line
end
function _tide_right_prompt
set -g tide_last_item newline
set -g _tide_which_side_working_on right
for item in $tide_right_prompt_items
_tide_item_$item
end
if test "$tide_last_item" != newline
set_color $tide_previous_bg_color -b normal
printf '%s' $tide_right_prompt_suffix
end
set_color normal # Make sure there is something printed on the last line
end

View File

@ -1,15 +0,0 @@
function _tide_right_prompt
set -g tide_last_item newline
set -g _tide_which_side_working_on right
for item in $tide_right_prompt_items
_tide_item_$item
end
if test "$tide_last_item" != newline
set_color $tide_previous_bg_color -b normal
printf '%s' $tide_right_prompt_suffix
end
set_color normal # Make sure there is something printed on the last line
end