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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 23, 2018 at 5:33 PM, Duy Nguyen <pclouds@xxxxxxxxx> wrote:
> On Wed, Feb 14, 2018 at 9:29 PM, SZEDER Gábor <szeder.dev@xxxxxxxxx> wrote:
>> 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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux