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

Re: [PATCH] contrib/completion: remove parentheses from prompt

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 22, 2011, 22:32 UTC
Message-ID
<7vk4elnchw.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20110422143248.1f4f84c0.kim.phillips@freescale.com>
Kim Phillips <kim.phillips@freescale.com> writes:
> 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.

That changes behaviour and makes people who like the current output unhappy, no? For example, I have

	PS1=': \h \W$(__git_ps1 "/%s"); '
and from it I get these output:
	: host git.git/master;
	: host git.git/(v1.7.5-rc3);
        : host git.git/(63e4ee5...);

I do like the fact that the tagname v1.7.5-rc3 is parenthesized---it makes it very clear that I am not on any branch while being detached.

Of course that is _my_ personal taste, but I wonder if you can remove the parentheses by changing the way you use __git_ps1 in your PS1 definition.

Previous: Kim PhillipsNext: Kim Phillips
Message 2 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.