commandlineparser / commandlineparser/commandline

Option are displayed in lowercase in help

Aperta
#909 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C#
Stelle
4.8k
Fork
478
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

**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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.