commandlineparser / commandlineparser/commandline

Option are displayed in lowercase in help

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

描述

**Describe the bug**
When no long or short name is provided for an option, the help display this option in lowercase

**To Reproduce**
Run this console program adding in the command line "--help "

```
class Options
{
[Option(HelpText = "Specify the input file.")]
public string InputFile { get; set; }
}

class Program
{
static void Main(string[] args)
{
var result = Parser.Default.ParseArguments(args);
result.WithParsed(options =>
{
Console.WriteLine($"InputFile: {options.InputFile}");
})
.WithNotParsed(errors =>
{
});
}
}
```

**Expected behavior**
"InputFile" instead of "inputfile"

**Screenshots**
![image](https://github.com/commandlineparser/commandline/assets/11009997/802a4a16-5b33-45cc-8f1f-cdc0199c5f21)

**Additional context**
I saw that it's in Specification.cs class method FromProperty that there is a call to ToLowerInvariant() that make the display lower

贡献指南

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

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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