From d11073a20a0aff0083524aa98d1b08a6cc3671a8 Mon Sep 17 00:00:00 2001 From: Ilan Cosman Date: Tue, 4 May 2021 09:29:34 -0700 Subject: [PATCH] Move _tide_left_prompt and _tide_right_prompt into _tide_prompt --- functions/_tide_left_prompt.fish | 15 --------------- functions/_tide_prompt.fish | 32 +++++++++++++++++++++++++++++++ functions/_tide_right_prompt.fish | 15 --------------- 3 files changed, 32 insertions(+), 30 deletions(-) delete mode 100644 functions/_tide_left_prompt.fish delete mode 100644 functions/_tide_right_prompt.fish diff --git a/functions/_tide_left_prompt.fish b/functions/_tide_left_prompt.fish deleted file mode 100644 index 462c19d..0000000 --- a/functions/_tide_left_prompt.fish +++ /dev/null @@ -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 diff --git a/functions/_tide_prompt.fish b/functions/_tide_prompt.fish index 958e538..05233a7 100644 --- a/functions/_tide_prompt.fish +++ b/functions/_tide_prompt.fish @@ -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 diff --git a/functions/_tide_right_prompt.fish b/functions/_tide_right_prompt.fish deleted file mode 100644 index bcf7309..0000000 --- a/functions/_tide_right_prompt.fish +++ /dev/null @@ -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