From f6226f08027c7b71b72563f94cbd832d2da8d245 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Tue, 19 Mar 2019 10:24:40 +0100 Subject: [PATCH] functions/fish_git_prompt: Useful status for show_upstream Returns 0 if there is no diversion, 1 otherwise. --- share/functions/fish_git_prompt.fish | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/functions/fish_git_prompt.fish b/share/functions/fish_git_prompt.fish index 9b0a20539..ef839c611 100644 --- a/share/functions/fish_git_prompt.fish +++ b/share/functions/fish_git_prompt.fish @@ -332,6 +332,9 @@ function __fish_git_prompt_show_upstream --description "Helper function for fish echo "$___fish_git_prompt_char_upstream_prefix$___fish_git_prompt_char_upstream_diverged" end end + + # For the return status + test "$count" = "0 0" end function fish_git_prompt --description "Prompt function for Git"