fix non existent remote branches

This commit is contained in:
lelgenio 2020-10-28 03:31:32 -03:00
parent a51203295d
commit 79482f3c0c
1 changed files with 5 additions and 1 deletions

View File

@ -262,8 +262,12 @@ function fish_prompt
_fish_prompt_git_status '??' '?' '{{@@ color.txt @@}}'
_fish_prompt_accent "$_git_branch"
for remote in (git remote)
if not git branch --remotes |
grep "$remote"/"$_git_branch" &> /dev/null
continue
end
if not git diff --quiet\
HEAD "$remote"/"$_git_branch"
HEAD "$remote"/"$_git_branch"
_fish_prompt_color '{{@@ color.txt @@}}' '↑'
end
end