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

Re: git-PS1 bash prompt setting

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Nov 26, 2006, 14:27 UTC
Message-ID
<Pine.LNX.4.63.0611261524130.30004@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<BAYC1-PASMTP037FDA6C6465F0541AC613AEE90@CEZ.ICE>
Hi,
On Thu, 16 Nov 2006, Sean wrote:
Show 5 quoted lines
> For what it's worth i'll post a little script i've been using for quite
> some time that helps a little.  It's called git-PS1 and is used by
> including it in your bash PS1 variable like so:
> 
> export PS1='$(git-PS1 "[\u@\h \W]\$ ")'

I actually like that very much! So much that I tried to implement this as an option to an existing builtin (I did not want to clutter the list of commands any more...).

But there really is no good place to put it: most commands need a git repository, and those which do not, are inappropriate to put an option "--show-ps1" into. Except maybe repo-config. Thoughts?

Ciao, Dscho

Previous: Junio C HamanoNext: Sean
Message 3 of 13 in “git-PS1 bash prompt setting”
  1. SeanNov 16, 2006
  2. Junio C HamanoNov 16, 2006
  3. Johannes SchindelinNov 26, 2006
  4. SeanNov 26, 2006
  5. Johannes SchindelinNov 26, 2006
  6. Nicolas VilzNov 26, 2006
  7. Junio C HamanoNov 27, 2006
  8. Nicolas VilzNov 27, 2006
  9. Shawn PearceNov 27, 2006
  10. Jakub NarebskiNov 27, 2006
  11. SeanNov 27, 2006
  12. Shawn PearceNov 27, 2006
  13. SeanNov 27, 2006

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.