Thread (115 messages) flat view 115 messages, 4 authors, 2018-12-11

Re: [PATCH v3 29/42] completion: use __gitcomp_builtin in _git_notes

From: Duy Nguyen <hidden>
Date: 2018-02-23 11:00:18

On Fri, Feb 23, 2018 at 5:33 PM, Duy Nguyen [off-list ref] wrote:
On Wed, Feb 14, 2018 at 9:29 PM, SZEDER Gábor [off-list ref] wrote:
quoted
And we could even go one step further:

  *,--*)
        __gitcomp_builtin notes_$subcommand
        ;;

This would have the benefit that if any of the remaining subcommands
learn --options, then they would be completed right away, without the
need to add that subcommand to the case arms.
You read my mind ;-) We won't do this in this series though (but I
will simplify the code as suggested). parse-options.c does not have
any concept about these subcommands. So a bit more work and can (and
will) be done separately.
Actually I misread you. This is not about completing subcommands but
subcommand's options, so it should work nicely. As long as we make
sure we handle error cases correctly (e.g. the user try to complete
options of a non-existing subcommand)
-- 
Duy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help