commandlineparser / commandlineparser/commandline

Support + (plus) sign for flags to UNSET a flag often used by Linux

Abierto
#833 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C#
Estrellas
4.8k
Forks
478
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

>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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.