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

Re: [PATCH] cg-completion: improve options and command listing

From
Ben Clifford <benc@hawaga.org.uk>
Date
Dec 20, 2005, 02:13 UTC
Message-ID
<FB1B98E9-58B8-44BE-AC08-606C30A5F61A@hawaga.org.uk>
In-Reply-To
<20051218143439.GA7064@diku.dk>
On 19 Dec 2005, at 00:04, Jonas Fonseca wrote:
Show 8 quoted lines
>>
>> I'm interested by what you mean by 'all sorts of garbage' - it seems
>> ok on my machine.
>
> ~/src/cogito/cogito > __cg_cmdlist | head
>         cg-add             Add files to the GIT repository.
>         cg-clean           Clean unknown files from the working tree.
>         cg-clone           Clone a remote GIT repository.
I definitely don't get that here. Bleugh!
> Else I was thinking of maybe adding --list parameter to cg-help to  
> have
> it list all known commands.

One thing that seemed kinda neat that I saw somewhere (perhaps in darcs?) is that it will tab complete only commands that would make sense in the present location (so cg <tab> would perhaps only bring up 'init' and 'help' in a non-git directory) - that would be rather more invasive to implement, I expect.

Another thing that has been mooted is autogenerating the completion code based on USAGE info - I've had a hack about in the past with that (its in the autogen branch in the gitcompletion repo on hawaga.org.uk) but then I reached the point where it seemed too icky for my tastes...

-- 
Ben • ベン • Бэн • 벤 • 班明
http://www.hawaga.org.uk/ben/
My email is high latency but best way to contact me. Alternatively,  
SMS number(s) at above URL.
Previous: Ben Clifford
Message 5 of 5 in “cg-completion: improve options and command listing”
  1. cg-completion: improve options and command listingJonas Fonseca, Dec 11, 2005
  2. Ben CliffordDec 17, 2005
  3. Jonas FonsecaDec 18, 2005
  4. Ben CliffordDec 19, 2005
  5. Ben CliffordDec 20, 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.