mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2025-03-04 08:34:10 +08:00
git ahead behind bug fixed
This commit is contained in:
parent
7272e4ebec
commit
c3ca7d21b5
@ -68,19 +68,21 @@ function fish_git_prompt_cm --description "Displays the git symbols"
|
|||||||
if test $is_repo="true"
|
if test $is_repo="true"
|
||||||
|
|
||||||
set -l git_ahead_behind (__budspencer_is_git_ahead_or_behind)
|
set -l git_ahead_behind (__budspencer_is_git_ahead_or_behind)
|
||||||
if test $git_ahead_behind[1] -gt 0
|
if test (count $git_ahead_behind) -eq 2
|
||||||
if test $git_style = "symbols"
|
if test $git_ahead_behind[1] -gt 0
|
||||||
set git_prompt (set_color -o $budspencer_colors[10])" ↑"
|
if test $git_style = "symbols"
|
||||||
else
|
set git_prompt (set_color -o $budspencer_colors[10])" ↑"
|
||||||
set git_prompt (set_color -o $budspencer_colors[10])" "$git_ahead_behind[1]
|
else
|
||||||
|
set git_prompt (set_color -o $budspencer_colors[10])" "$git_ahead_behind[1]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
if test $git_ahead_behind[2] -gt 0
|
if test $git_ahead_behind[2] -gt 0
|
||||||
if test $git_style = "symbols"
|
if test $git_style = "symbols"
|
||||||
set git_prompt $git_prompt(set_color -o $budspencer_colors[10])" ↓"
|
set git_prompt $git_prompt(set_color -o $budspencer_colors[10])" ↓"
|
||||||
else
|
else
|
||||||
set git_prompt $git_prompt(set_color -o $budspencer_colors[10])" "$git_ahead_behind[2]
|
set git_prompt $git_prompt(set_color -o $budspencer_colors[10])" "$git_ahead_behind[2]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -141,7 +143,7 @@ function fish_git_prompt_cm --description "Displays the git symbols"
|
|||||||
set git_prompt $git_prompt(set_color -o $budspencer_colors[16])" "$git_stashed
|
set git_prompt $git_prompt(set_color -o $budspencer_colors[16])" "$git_stashed
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
echo $git_prompt
|
echo -n $git_prompt
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user