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

Re: [PATCH 2/2] completion: split __git_ps1 into a separate script

From
SZEDER Gábor <szeder@ira.uka.de>
Date
May 24, 2012, 20:47 UTC
Message-ID
<20120524204726.GB2052@goldbirke>
In-Reply-To
<1337719600-7361-3-git-send-email-felipe.contreras@gmail.com>
Hi,
On Tue, May 22, 2012 at 10:46:40PM +0200, Felipe Contreras wrote:
> bash-completion 1.90 shipped 

That's still beta, right? (or the bash-completion website is out of date...)

Show 13 quoted lines
> with support to load completions
> dynamically[1], which means the git completion script wouldn't be loaded
> until the user types 'git <tab>'--this creates a problem to people using
> __git_ps1(); that function won't be available when the shell is first
> created.
> 
> For now distributions have workarounded this issue by moving the git
> completion to the "compatdir"[2]; this of course is not ideal.
> 
> The solution, proposed by Kerrick Staley[3], is to split the git script
> in two; the part that deals with __git_ps1() in one (i.e.
> git-prompt.sh), and everything else in another (i.e.
> git-completion.bash).

This breaks existing setups, where the user installs git-completion.bash with 'make install', or where the user sources git-completion.bash directly from the repository.

Best, Gábor

Previous: Junio C HamanoNext: Ville Skyttä
Message 19 of 34 in “completion: split into git-prompt.sh”
  1. 0/2 completion: split into git-prompt.shFelipe Contreras, May 22, 2012
  2. 1/2 completion: remove executable modeFelipe Contreras, May 22, 2012
  3. 2/2 completion: split __git_ps1 into a separate scriptFelipe Contreras, May 22, 2012
  4. Zbigniew Jędrzejewski-SzmekMay 22, 2012
  5. Ted PavlicMay 22, 2012
  6. Felipe ContrerasMay 23, 2012
  7. Felipe ContrerasMay 23, 2012
  8. Junio C HamanoMay 23, 2012
  9. Felipe ContrerasMay 23, 2012
  10. Junio C HamanoMay 23, 2012
  11. Ted PavlicMay 23, 2012
  12. Felipe ContrerasMay 23, 2012
  13. Ted PavlicMay 23, 2012
  14. SZEDER GáborMay 24, 2012
  15. SZEDER GáborMay 24, 2012
  16. Ted PavlicMay 22, 2012
  17. Felipe ContrerasMay 23, 2012
  18. Junio C HamanoMay 23, 2012
  19. SZEDER GáborMay 24, 2012
  20. Ville SkyttäMay 25, 2012
  21. Where should git-prompt.sh be installed?Jonathan Nieder, Oct 25, 2012
  22. Drew NorthupOct 25, 2012
  23. Danny YatesOct 25, 2012
  24. __git_ps1: migrate out of contrib/completionJonathan Nieder, Oct 25, 2012
  25. Felipe ContrerasOct 25, 2012
  26. Todd ZullingerNov 8, 2012
  27. Anders KaseorgOct 25, 2012
  28. SZEDER GáborOct 25, 2012
  29. Jonathan NiederOct 25, 2012
  30. Junio C HamanoMay 23, 2012
  31. SZEDER GáborMay 25, 2012
  32. Thomas RastMay 25, 2012
  33. Felipe ContrerasMay 25, 2012
  34. Junio C HamanoMay 25, 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.