commandlineparser / commandlineparser/commandline

Option to sort commands by verb name

Offen
#737 1 Kommentar 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
C#
Sterne
4.8k
Forks
478
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.