commandlineparser / commandlineparser/commandline
Support + (plus) sign for flags to UNSET a flag often used by Linux
- Vorherrschende Sprache
- C#
- Sterne
- 4.8k
- Forks
- 478
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
>All of the single letter options that have a corresponding name can be used as an argument to the -o option. The set -o name is provided next to the single letter option in the description below. Specifying a dash “-” turns the option on, while using a plus “+” disables the option.
Meaning, assume you have the following option:
[Option('x', "XXXX", Required = false, Default = true)]
public bool X { get; set; }
And you would pass `+x`, then the result should be `False`:
app.exe +x
This seems like a better approach then a nullable bool:
[Option('x', "XXXX", Required = false, Default = true)]
public bool? X { get; set; }
As that requires to pass:
app.exe -x false
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.