diff options
Diffstat (limited to 'contrib/completion/git-prompt.sh')
-rw-r--r-- | contrib/completion/git-prompt.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh index c5473dc8db..3c3fc6d5d9 100644 --- a/contrib/completion/git-prompt.sh +++ b/contrib/completion/git-prompt.sh @@ -270,7 +270,7 @@ __git_ps1_colorize_gitstring () __git_eread () { - f="$1" + local f="$1" shift test -r "$f" && read "$@" <"$f" } @@ -288,6 +288,7 @@ __git_eread () # In this mode you can request colored hints using GIT_PS1_SHOWCOLORHINTS=true __git_ps1 () { + local exit=$? local pcmode=no local detached=no local ps1pc_start='\u@\h:\w ' @@ -511,4 +512,7 @@ __git_ps1 () else printf -- "$printf_format" "$gitstring" fi + + # preserve exit status + return $exit } |