From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: <dev@dpdk.org>, Aman Singh <aman.deep.singh@intel.com>
Subject: Re: [PATCH v1 2/2] app/testpmd: sort commands by help string
Date: Fri, 23 May 2025 12:19:27 +0200 [thread overview]
Message-ID: <672d8dee-b3fc-4866-aaa7-ef444e2ec90e@intel.com> (raw)
In-Reply-To: <20250521152409.37302820@hermes.local>
On 5/22/2025 12:24 AM, Stephen Hemminger wrote:
> On Wed, 14 May 2025 14:02:12 +0100
> Anatoly Burakov <anatoly.burakov@intel.com> wrote:
>
>> When using '?' to find commands, it occasionally is difficult to find the
>> needed commands because all commands are not in alphabetical order, but
>> rather can be ordered rather arbitrarily.
>>
>> To address this, use help string to order commands. This sacrifices some
>> amount of grouping (i.e. when tm commands go one after another), but may
>> improve discoverability (and most similar commands tend to have similar
>> help strings and will be located closer together anyway).
>>
>> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
>> ---
>
> Sorting is good, but why not pre-sort builtin_ctx and make it const?
>
It's difficult and error-prone to sort these messages statically because
there's no obvious to know where to insert the new value without reading
lots of help strings from other commands. You could argue that we could
sort by variable name but it feels like an unnecessary burden on the
developer to maintain this sorting order when we can just automate it at
runtime without giving up anything.
--
Thanks,
Anatoly
next prev parent reply other threads:[~2025-05-23 10:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-14 13:02 [PATCH v1 1/2] app/testpmd: harmonize case in help strings Anatoly Burakov
2025-05-14 13:02 ` [PATCH v1 2/2] app/testpmd: sort commands by help string Anatoly Burakov
2025-05-14 13:29 ` Bruce Richardson
2025-05-21 22:24 ` Stephen Hemminger
2025-05-23 10:19 ` Burakov, Anatoly [this message]
2025-05-23 10:09 ` Anatoly Burakov
2025-05-14 13:26 ` [PATCH v1 1/2] app/testpmd: harmonize case in help strings Bruce Richardson
2025-05-15 11:07 ` Burakov, Anatoly
2025-05-23 10:09 ` Anatoly Burakov
2025-05-23 10:36 ` [PATCH v2 " Anatoly Burakov
2025-05-23 10:36 ` [PATCH v2 2/2] app/testpmd: sort commands by help string Anatoly Burakov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=672d8dee-b3fc-4866-aaa7-ef444e2ec90e@intel.com \
--to=anatoly.burakov@intel.com \
--cc=aman.deep.singh@intel.com \
--cc=dev@dpdk.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).