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

Re: bash-completion now loads completions dynamically, so __git_ps1 is not defined when you open a shell

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Apr 7, 2012, 13:01 UTC
Message-ID
<CAMP44s0rYpVhPpaf=C_aPoLUxy=EsiSxYNf04+B0_-MxzCftFw@mail.gmail.com>
In-Reply-To
<CANaWP3w9KDu57aHquRRYt8td_haSWTBKs7zUHy-xu0B61gmr9A@mail.gmail.com>
On Thu, Mar 29, 2012 at 3:00 AM, Kerrick Staley <mail@kerrickstaley.com> wrote:
> 1) define __git_ps1 (and friends) in a different script, which will
> get installed in /etc/profile.d (this is the "proper way")

I prefer this because it's useful for zsh as well; not everybody uses the bash completion in zsh. I believe somebody already proposed this because of this reason. FWIW I named the script git-prompt.sh on my side.

Cheers.
-- 
Felipe Contreras
Previous: Jeff KingNext: Jonathan Nieder
Message 7 of 8 in “bash-completion now loads completions dynamically, so __git_ps1 is not defined when you open a shell”
  1. Kerrick StaleyMar 28, 2012
  2. Junio C HamanoMar 28, 2012
  3. Jeff KingMar 29, 2012
  4. Jonathan NiederMar 28, 2012
  5. Kerrick StaleyMar 29, 2012
  6. Jeff KingMar 29, 2012
  7. Felipe ContrerasApr 7, 2012
  8. Jonathan NiederApr 7, 2012

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.