commandlineparser / commandlineparser/commandline

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

Đang mở
#902 5 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C#
Star
4.8k
Fork
478
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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?

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.