commandlineparser / commandlineparser/commandline

How to access unbound arguments?

未關閉
#720 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
C#
星號
4.8k
分支
478
PR 合併指標
30 天內沒有已合併 PR

描述

I would like to pass completely unbound unparsed arguments. From documentation I assumed combination of `[Value]` attribute add dash-dash should work, for example:

```program verb -a 1 2 3 -b 5 6 7 -- ADDITION ARGUMENT COME HERE```

yet it does not seem to be working:

```
[Verb("verb")]
public class Verb
{
[Option('a')]
public IEnumerable A { get; set; };

[Option('b')]
public IEnumerable B { get; set; };

[Value(0)]
public IEnumerable More { get; set; }
}
```

I guess the problem is index 0 on Value, but it seems to be required?
How it supposed to work?

Thanks,

PS. I used `EnableDashDash`
PPS. Is it possible that it is working in general but not for verbs?
PPPS. It seems that `More` gets consumed by 'b' (dash dash is not a circuit breaker when parsing `b`)

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。