Re: [PATCH] git-prompt.sh: show the upstream abbrev name
- From
SZEDER Gábor <szeder@ira.uka.de>
- Date
- Oct 10, 2013, 13:58 UTC
- Message-ID
- <20131010135813.GF19704@goldbirke>
- In-Reply-To
- <1381411933-20600-1-git-send-email-jcarsique@nuxeo.com>
Hi,
On Thu, Oct 10, 2013 at 03:32:13PM +0200, Julien Carsique wrote:
Show 6 quoted lines
> @@ -204,6 +206,9 @@ __git_ps1_show_upstream ()
> *) # diverged from upstream
> p=" u+${count#* }-${count% *}" ;;
> esac
> + if [[ -n "$count" && -n "$name" ]]; then
> + p+=" $(git rev-parse --abbrev-ref "$upstream" 2>/dev/null)"The '+=' operator is not supported in all Bash versions we care about. Please write this as p="$p $(...)".
Thanks, Gábor