On Sat, Nov 3, 2018 at 8:59 AM Denton Liu <liu.den...@gmail.com> wrote:
> > @@ -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

Reply via email to