commandlineparser / commandlineparser/commandline
Global parameters before verbs
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 478
- PR merge metrics
- No merged PRs in 30d
Description
So I want to do something like this:
```bash
$ app.exe
```
First argument is a value, and I want to make it global for every verb in app. For now it is implemented like this:
```c#
abstract class BaseOptions
{
[Value(0)]
public string file { get; set; }
}
[Verb("verb1")]
class Verb1Options : BaseOptions
{
[Option('a', "verb-1-option")]
public bool a{ get; set; }
[Option('b', "verb-1-another-option")]
public bool a{ get; set; }
}
[Verb("verb2")]
class Verb2Options : BaseOptions
{
[Option('c', "verb-2-option")]
public bool c{ get; set; }
}
```
But the issue is first goes verb then value. I need in reverse Can I do it?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.