zsh: fix up/down arrows in git prompt

The previous arrows overlapped with some numbers, e.g. 7.
This commit is contained in:
Fernando Schauenburg 2024-08-02 01:07:46 +02:00
parent 32a14e5b61
commit 824089b6ba

View file

@ -160,8 +160,8 @@ fs_prompt_git() {
{ {
local sep="${fg[sep]}" local sep="${fg[sep]}"
local tracking=() local tracking=()
(($ahead)) && tracking+="${fg[ahead]}${ahead}" # ↑ (($ahead)) && tracking+="${fg[ahead]}${ahead}" # ↑
(($behind)) && tracking+="${fg[behind]}${behind}" # ↓ (($behind)) && tracking+="${fg[behind]}${behind}" # ↓ ⇣
(($#tracking)) && result+="${(pj:$sep:)tracking}" (($#tracking)) && result+="${(pj:$sep:)tracking}"
(($conflicts)) && result+="${fg[conflict]} %{%B%}${conflicts}%{%b%}" (($conflicts)) && result+="${fg[conflict]} %{%B%}${conflicts}%{%b%}"