git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] contrib/completion: remove parentheses from prompt

From
KPKim Phillips <kim.phillips@freescale.com>
Date
Apr 22, 2011, 19:32 UTC
Message-ID
<20110422143248.1f4f84c0.kim.phillips@freescale.com>

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
Next: Junio C Hamano
Message 1 of 3 in “contrib/completion: remove parentheses from prompt”
  1. contrib/completion: remove parentheses from promptKim Phillips, Apr 22, 2011
  2. Junio C HamanoApr 22, 2011
  3. Kim PhillipsApr 22, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.