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

Re: [PATCH v2] completion: use builtin completion for format-patch

From
Duy Nguyen <pclouds@gmail.com>
Date
Nov 3, 2018, 08:29 UTC
Message-ID
<CACsJy8B4vrtsBu79J2kYNmcNQfRkgetdbi8XOPjm7j1kNDJ6Yg@mail.gmail.com>
In-Reply-To
<20181103075918.GA905@archbookpro.localdomain>
On Sat, Nov 3, 2018 at 8:59 AM Denton Liu <liu.denton@gmail.com> wrote:
Show 14 quoted lines
> > @@ -2081,7 +2077,7 @@ _git_send_email ()
> >               return
> >               ;;
> >       --*)
> > -             __gitcomp "--annotate --bcc --cc --cc-cmd --chain-reply-to
> > +             __gitcomp_builtin send-email "--annotate --bcc --cc --cc-cmd --chain-reply-to
> >                       --compose --confirm= --dry-run --envelope-sender
> >                       --from --identity
> >                       --in-reply-to --no-chain-reply-to --no-signed-off-by-cc
>
> Would it make sense to make send-email's completion helper print these
> out directly? That way, if someone were to modify send-email in the
> future, they'd only have to look through one file instead of both
> send-email and the completions script.

I did think about that and decided not to do it (in fact the first revision of this patch did exactly that).

If we have to maintain this list manually, we might as well leave to the place that matters: the completion script. I don't think the person who updates send-email.perl would be always interested in completion support. And the one that is interested usually only looks at the completion script. Putting this list in send-email.perl just makes it harder to find.

-- 
Duy
Previous: Denton LiuNext: Junio C Hamano
Message 12 of 13 in “completion: use builtin completion for format-patch”
  1. completion: use builtin completion for format-patchDenton Liu, Oct 29, 2018
  2. Junio C HamanoOct 30, 2018
  3. Denton LiuOct 30, 2018
  4. completion: use builtin completion for format-patchDenton Liu, Oct 30, 2018
  5. Junio C HamanoOct 30, 2018
  6. Duy NguyenOct 30, 2018
  7. Junio C HamanoNov 1, 2018
  8. Duy NguyenNov 1, 2018
  9. Junio C HamanoNov 1, 2018
  10. Duy NguyenNov 3, 2018
  11. Denton LiuNov 3, 2018
  12. Duy NguyenNov 3, 2018
  13. Junio C HamanoNov 3, 2018

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.