Flag to hide description
还没有人认领这个 Issue。
评估
调研方向
从 RootCommand、CommandLineConfiguration 以及示例中显示的 HelpText 输出路径开始;检查 config.Invoke("--help") 后 Description 和 Usage 部分是如何呈现的。完成的标准是提供一种抑制 Description: 部分的方法,包括描述为空时,同时保持其余帮助输出不变。
由索引模型根据 Issue 内容生成。
描述
Hi,
It would be helpful to have a flag or property to control whether the description is included in the generated HelpText output.
In our use case, we are using the HelpText in our documentation, and we don’t want to include the description section—especially when the description is empty.
Here’s a minimal example:
RootCommand rootCommand = new RootCommand();
CommandLineConfiguration config = new(rootCommand) {Output = new StringWriter()};
config.Invoke("--help");
Console.Out.WriteLine(config.Output);
Current Output:
Description:
Usage:
ConsoleApp1 [options]
Options:
-?, -h, --help Show help and usage information
--version Show version information
It would be great to have a way to suppress the Description: section entirely, for example:
rootCommand.HideDescription = true;
Thanks for the great library!
- 主要语言
- C#
- 星标
- 3.7k
- 派生
- 434
- 平均合并
- 4 小时 46 分钟
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dotnet/command-line-api 的其他 Issue
-
German localization is incomplete可能已有人在做 @b-v-d-e-v 于 7 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
dotnet/command-line-api#2852 ·
-
Incomplete French (fr) translation: RequiredOptionWasNotProvided not translated可能已有人在做 @JPBlanc 于 105 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
dotnet/command-line-api#2822 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 62/100
dotnet/command-line-api#2792 · 2 条评论 · 16 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 62/100
dotnet/command-line-api#2704 ·
-
GetCompletions should check exit code of invoked application可能已有人在做 @baradgur 于 1276 天前认领。 未关闭Area-Completions bug help wanted
难度 2/5 1-3 小时 新手友好度 72/100
dotnet/command-line-api#2137 · 1 条评论 · 3 个 reaction ·
查看 dotnet/command-line-api 的全部 Issue
相似的 Issue
-
type/automation type/tech-debt
难度 1/5 1 小时以内 新手友好度 72/100
维护者通常 1 天内回复
-
no-stack-trace
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
docs/external squad/utforming
难度 2/5 1-3 小时 新手友好度 75/100
Altinn/altinn-studio#21041 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
stryker-mutator/stryker-net#3892 ·
维护者通常 1 天内回复