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

Re: [PATCH] bash completion: add basic support for git-reflog

From
Tay Ray Chuan <rctay89@gmail.com>
Date
Nov 22, 2010, 15:50 UTC
Message-ID
<AANLkTinJPQF-khzViED+ROyojEr9nHrcgwKQWsDugD7Y@mail.gmail.com>
In-Reply-To
<20101122152409.GA7010@neumann>
Hi,
2010/11/22 SZEDER Gábor <szeder@ira.uka.de>:
Show 6 quoted lines
> On Sun, Nov 21, 2010 at 01:32:48AM +0800, Tay Ray Chuan wrote:
>> Add basic completion for the three subcommands - show, expire, delete.
>> Try completing refs for these too.
>
> Heh, I've always thought reflog is plumbing, and that's why the
> completion script doesn't support it.

That didn't really cross my mind, I just did this out of my irritation with its absence.

(After some checking, it's actually part of git-log, so I don't think it counts as plumbing.)

Show 8 quoted lines
> This only looks at the previous word on the command line, and leads to
> wrong behavior when an option is used:
>
>  $ git reflog expire --verbose <TAB><TAB>
>  delete   expire   show
>
> To prevent this you could use the __git_find_on_cmdline() helper
> function and follow how other completion functions use it.
Yep I'll look into it.
-- 
Cheers,
Ray Chuan
Previous: SZEDER GáborNext: Tay Ray Chuan
Message 3 of 5 in “bash completion: add basic support for git-reflog”
  1. bash completion: add basic support for git-reflogTay Ray Chuan, Nov 20, 2010
  2. SZEDER GáborNov 22, 2010
  3. Tay Ray ChuanNov 22, 2010
  4. bash completion: add basic support for git-reflogTay Ray Chuan, Nov 22, 2010
  5. Jonathan NiederNov 22, 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.