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

Re: latest stg/git commandline completions code

From
Petr Baudis <pasky@suse.cz>
Date
Nov 10, 2005, 09:40 UTC
Message-ID
<20051110094013.GM30496@pasky.or.cz>
In-Reply-To
<CDEAA4E3-54FE-4825-BFCF-DCE34DBD138A@hawaga.org.uk>

Dear diary, on Thu, Nov 10, 2005 at 02:59:09AM CET, I got a letter where Ben Clifford <benc@hawaga.org.uk> said that...

Show 5 quoted lines
> There are a few small common functions that are used by all the git  
> completions, though. I suppose for going into cogito's contrib/ I  
> should include them directly in cogito completion code, but that  
> seems a little messy, as it would be nice to keep them in-sync with  
> what is used in the other completion files. hmm.

Then could you please separate those from the git completion to some kind of 'library'?

Dear diary, on Thu, Nov 10, 2005 at 07:57:34AM CET, I got a letter where Ben Clifford <benc@hawaga.org.uk> said that...

Show 15 quoted lines
> On 10 Nov 2005, at 09:23, Petr Baudis wrote:
> >Besides, it would be probably best to just autogenerate the
> >auto-completion code - the usage information in Cogito is supposed  
> >to be
> >100% consistent and correct, so it should be a reliable source for  
> >that.
> 
> Maybe reliable and consistent but I think that info would need a bit  
> of augmentation to use for specifying autocompletion - for example,  
> in the case of:
> 
> > Usage: cg-branch-add BRANCH_NAME LOCATION
> 
> BRANCH_NAME should *not* exist so it doesn't make sense to  
> autocomplete from the branch list, but in the case of:
When you do
	cat > <tab><tab>

bash happily autocompletes as well. I don't think this is a problem, besides it can be useful when you want to use some existing branch name, just slightly modified.

> The amount of augmentation is probably not too much -  probably  
> sufficient  to specify for each parameter a completion-source(s)  
> (heads, branches, filenames, blah) that doesn't get displayed in -- 
> help. But this is more information to maintain and get out of date...

It's enough if we auto-build the completion and complain loudly and error out when we hit something unknown.

> (I confess to having pretty much no idea how zsh completion works...)
Me neither. :-)
-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.
Previous: Ben CliffordNext: Ben Clifford
Message 13 of 14 in “Re: latest stg/git commandline completions code”
  1. BlaisorbladeOct 25, 2005
  2. Catalin MarinasOct 25, 2005
  3. BlaisorbladeOct 25, 2005
  4. Catalin MarinasOct 25, 2005
  5. BlaisorbladeOct 25, 2005
  6. Catalin MarinasOct 26, 2005
  7. BlaisorbladeOct 26, 2005
  8. Ben CliffordNov 8, 2005
  9. Petr BaudisNov 9, 2005
  10. Ben CliffordNov 10, 2005
  11. Ben CliffordNov 10, 2005
  12. Ben CliffordNov 10, 2005
  13. Petr BaudisNov 10, 2005
  14. Ben CliffordNov 16, 2005

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.