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