commandlineparser / commandlineparser/commandline

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

オープン
#902 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C#
スター
4.8k
フォーク
478
PR マージ指標
30日以内にマージされた PR はありません

説明

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?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。