commandlineparser / commandlineparser/commandline

Option to sort commands by verb name

Open
#737 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
4.8k
Forks
478
PR merge metrics
No merged PRs in 30d

Description

Hi,

Is it possible to get option to sort all command by VerbAttribute?
Example: for next commands -
[Verb("pa", HelpText = "Perform action")]
public class PerformActionRequest { }

[Verb("npa", HelpText = "Don't do it")]
public class PreventActionRequest { }

[Verb("a", HelpText = "Action")]
public class ActionRequest { }

parser.ParseArguments(args, typeof(PreventActionRequest ),
typeof(PerformActionRequest ),
typeof(ActionRequest ))

At cmd we'll see all commands sorted by Verb attribute:
a Action
npa Don't do it
p Perform action

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the parser.ParseArguments entry point and inspect how VerbAttribute values are collected and displayed in command help. Confirm the desired ordering and identify the existing command-listing tests or entry points; done means commands appear sorted by verb name while retaining their help text.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.