Re: [PATCH/RFC 5/5] help: add "-a --verbose" to list all commands with synopsis

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

 



Eric Sunshine <sunshine@xxxxxxxxxxxxxx> writes:

> On Mon, Mar 26, 2018 at 12:55 PM, Nguyễn Thái Ngọc Duy
> <pclouds@xxxxxxxxx> wrote:
>> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>
>> ---
>> diff --git a/help.c b/help.c
>> @@ -282,6 +282,67 @@ void list_porcelain_cmds(void)
>> +static const char *get_category_name(unsigned int category)
>> +{
>> +       switch (category) {
>> +       case CAT_ancillaryinterrogators: return _("Ancillary interrogators");
>> +       case CAT_ancillarymanipulators: return _("Ancillary manipulators");
>> +       case CAT_foreignscminterface: return _("Foreign SCM interface");
>> +       case CAT_mainporcelain: return _("Main porcelain");
>> +       case CAT_plumbinginterrogators: return _("Plumbing interrogators");
>> +       case CAT_plumbingmanipulators: return _("Plumbing interrogators");
>
> s/interrogators"/manipulators"/
>
>> +       case CAT_purehelpers: return _("Pure helpers");
>> +       case CAT_synchelpers: return _("Sync helpers");
>> +       case CAT_synchingrepositories: return _("Synching repositories");
>> +       default:
>> +               die("BUG: unknown command category %u", category);
>> +       }

Somehow this screams "an array of strings" at me.  Aren't this
CAT_things small and dense enum?



[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