commandlineparser / commandlineparser/commandline

Allow no value

Offen
#674 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
C#
Sterne
4.8k
Forks
478
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I'm trying to implement a string option that can have three states:
1. Not supplied
2. No value
3. Empty or value

I want to do the following:
`MyApp.exe` writes unformatted output to standard output
`MyApp.exe --json` writes JSON formatted output to standard output
`MyApp.exe --json file.json` writes JSON formatted output to `file.json`

Is this currently possible?

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.