fish: fix minor error on prompt

This commit is contained in:
lelgenio 2022-04-01 09:33:22 -03:00
parent 091d90a151
commit 23b60b96a5
1 changed files with 2 additions and 2 deletions

View File

@ -85,11 +85,11 @@ function fish_git_prompt
# Remote has the current branch
if test -n "$git_remote_branch"
# print a "↑" if ahead of origin
test 0 -ne (git log --oneline "$git_remote_branch"..HEAD | wc -l)
test 0 -ne (git log --oneline "$git_remote_branch"..HEAD -- | wc -l)
and set -l _git_sync_ahead '↑'
# print a "↓" if behind of origin
test 0 -lt (git log --oneline HEAD.."$git_remote_branch" | wc -l)
test 0 -lt (git log --oneline HEAD.."$git_remote_branch" -- | wc -l)
and set -l _git_sync_behind '↓'
if set -q _git_sync_ahead _git_sync_behind