commandlineparser / commandlineparser/commandline

How to pass and retain subsequent arguments to a verb with exact format?

Abierto
#902 5 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

I am trying to create a verb that includes all subsequent arguments. I require it to retain the exact format in which it is passed to the verb. My intention is to forward the arguments as a shell command. I have tried the following configuration:

```csharp
[Verb("foreach")]
public readonly struct ForeachVerb
{
[Value(0)]
public IEnumerable Command { get; set; }
}
```

But unfortunately, I am encountering errors indicating that options `f`, `foo`, and `bar` are missing for this test argument:

foreach foo bar baz -f true --foo --bar 1

As a workaround, I can fall back to the original `args`, but I am curious if there is any chance to utilize the capabilities that `CommandLineParser` offers. Does anyone have an idea on how to configure `CommandLineParser` to achieve this?

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.