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

Re: [PATCH v2/RFC] Make git-completion Bash 4 compatible.

From
Jakub Narebski <jnareb@gmail.com>
Date
Oct 28, 2010, 16:15 UTC
Message-ID
<m31v7ai9c2.fsf@localhost.localdomain>
In-Reply-To
<20101028081445.27cc603b@MonteCarlo>
Peter van der Does <peter@avirtualhome.com> writes:
Show 26 quoted lines
> On Wed, 27 Oct 2010 19:54:55 -0500
> Jonathan Nieder <jrnieder@gmail.com> wrote:
> 
> > Peter van der Does wrote:
> > 
> > > The bash completion script could still be included with the core,
> > > but we can offer different versions for different shells.
> > 
> > Why?  That's three times the maintenance work.
> 
> The cons of everything in one script:
> - If the script needs an update the submitter has to take in account
>   the different coding standards each shell has. Examples of this have
>   been given in the commit message of 06f44c3 (completion: make
>   compatible with zsh, 2010-09-06)
> 
> - The script could end up with a slew of if statements to see which
>   shell the script is running in and taking some action.
> 
> - Shells don't share all the same functions, the script could be filled
>   with functions not needed in other shells. the zsh patch includes
>   one, the Bash 4 patch includes several.
> 
> The pros of everything in one script:
> - Small changes, like adding an extra option to a git command for
>   completion only have to implemented in one script.

What about having separate scripts, but sourcing common library that doesn't do completion, but just provides list of possible completions? This would be best of both worlds, I think.

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Peter van der DoesNext: Peter van der Does
Message 8 of 11 in “Make git-completion Bash 4 compatible.”
  1. Make git-completion Bash 4 compatible.Peter van der Does, Oct 27, 2010
  2. Brian GernhardtOct 27, 2010
  3. Jonathan NiederOct 27, 2010
  4. SZEDER GáborOct 27, 2010
  5. Peter van der DoesOct 28, 2010
  6. Jonathan NiederOct 28, 2010
  7. Peter van der DoesOct 28, 2010
  8. Jakub NarebskiOct 28, 2010
  9. Peter van der DoesOct 28, 2010
  10. SZEDER GáborOct 27, 2010
  11. Jonathan NiederOct 28, 2010

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.