git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kim Phillips <kim.phillips@freescale.com>
To: <git@vger.kernel.org>
Subject: [PATCH] contrib/completion: remove parentheses from prompt
Date: Fri, 22 Apr 2011 14:32:48 -0500	[thread overview]
Message-ID: <20110422143248.1f4f84c0.kim.phillips@freescale.com> (raw)

Save horizontal terminal line real estate by removing
parentheses from the prompt branch display.  The branch
is already sufficiently visually delimited by the preceding
space character.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
---
 contrib/completion/git-completion.bash |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 840ae38..1373fd4 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -268,7 +268,6 @@ __git_ps1 ()
 
 				b="$(cut -c1-7 "$g/HEAD" 2>/dev/null)..." ||
 				b="unknown"
-				b="($b)"
 			}
 		fi
 
@@ -312,7 +311,7 @@ __git_ps1 ()
 		fi
 
 		local f="$w$i$s$u"
-		printf "${1:- (%s)}" "$c${b##refs/heads/}${f:+ $f}$r$p"
+		printf "${1:- %s}" "$c${b##refs/heads/}${f:+ $f}$r$p"
 	fi
 }
 
-- 
1.7.4.5.2.g95442

             reply	other threads:[~2011-04-22 19:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-22 19:32 Kim Phillips [this message]
2011-04-22 22:32 ` [PATCH] contrib/completion: remove parentheses from prompt Junio C Hamano
2011-04-22 23:43   ` Kim Phillips

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110422143248.1f4f84c0.kim.phillips@freescale.com \
    --to=kim.phillips@freescale.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).