This commit is contained in:
Ilan Cosman 2022-03-11 18:22:48 -08:00
parent 598bace385
commit 97b8c703eb
2 changed files with 40 additions and 39 deletions

View File

@ -21,11 +21,11 @@ end
if contains newline $_tide_left_items # two line prompt initialization if contains newline $_tide_left_items # two line prompt initialization
set -l dirname (status dirname) set -l dirname (status dirname)
set -l left_prompt_items "$(cat $dirname/tide/items/_tide_item_{$tide_left_prompt_items}.fish)" set -l leftPromptItemCode "$(cat $dirname/tide/items/_tide_item_{$_tide_left_items}.fish)"
set -l right_prompt_items "$(cat $dirname/tide/items/_tide_item_{$tide_right_prompt_items}.fish)" set -l rightPromptItemCode "$(cat $dirname/tide/items/_tide_item_{$_tide_right_items}.fish)"
cat $dirname/tide/functions/_tide_2_line_prompt.fish | cat $dirname/tide/functions/_tide_2_line_prompt.fish |
string replace "# @ left side goes here @" $left_prompt_items | string replace "# @ left side goes here @" $leftPromptItemCode |
string replace "# @ right side goes here @" $right_prompt_items >$dirname/tide/prompt.fish string replace "# @ right side goes here @" $rightPromptItemCode >$dirname/tide/prompt.fish
test "$tide_prompt_add_newline_before" = true && set -l add_newline '\n' test "$tide_prompt_add_newline_before" = true && set -l add_newline '\n'

View File

@ -2,7 +2,6 @@ if git branch --show-current 2>/dev/null | string replace -r "(.{$tide_git_trunc
git rev-parse --git-dir | read -f git_dir git rev-parse --git-dir | read -f git_dir
set location $_tide_location_color$location set location $_tide_location_color$location
else if test $pipestatus[1] != 0 else if test $pipestatus[1] != 0
return
else if git tag --points-at HEAD | string replace -r "(.{$tide_git_truncation_length}).+" '$1…' | read location else if git tag --points-at HEAD | string replace -r "(.{$tide_git_truncation_length}).+" '$1…' | read location
git rev-parse --git-dir | read -f git_dir git rev-parse --git-dir | read -f git_dir
set location '#'$_tide_location_color$location set location '#'$_tide_location_color$location
@ -11,6 +10,7 @@ else
set location @$_tide_location_color$location set location @$_tide_location_color$location
end end
if test -n "$location"
# Operation # Operation
if test -d $git_dir/rebase-merge if test -d $git_dir/rebase-merge
read -f step <$git_dir/rebase-merge/msgnum read -f step <$git_dir/rebase-merge/msgnum
@ -62,3 +62,4 @@ _tide_print_item git $_tide_location_color$tide_git_icon' ' (set_color white; ec
set_color $tide_git_color_staged; echo -ns ' +'$staged set_color $tide_git_color_staged; echo -ns ' +'$staged
set_color $tide_git_color_dirty; echo -ns ' !'$dirty set_color $tide_git_color_dirty; echo -ns ' !'$dirty
set_color $tide_git_color_untracked; echo -ns ' ?'$untracked) set_color $tide_git_color_untracked; echo -ns ' ?'$untracked)
end