commandlineparser / commandlineparser/commandline

Option to sort commands by verb name

未关闭
#737 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C#
星标
4.8k
派生
478
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

这个仓库没有索引到贡献指南

调研方向

从 parser.ParseArguments 入口点开始,检查 VerbAttribute 值是如何收集并显示在命令帮助中的。确认所需的排序顺序,并找出现有的命令列表测试或入口点;完成的标准是命令按动词名称排序显示,同时保留其帮助文本。

由索引模型根据 Issue 内容生成。

评估

技术栈
csharp
领域
cli
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
32/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。