dotnet / dotnet/command-line-api
Accessing global options
Open
- Dominant language
- C#
- Stars
- 3.7k
- Forks
- 428
- PR merge metrics
- No merged PRs in 30d
Description
I don't see how to handle global options with the new 2.0 API.
```
var cmd = //... some Command, the RootCommand is somewhere else created, not accessible here
var arg = new Argument("x", "Mysterious x");
cmd.SetHandler(async (string x) =>
{
await DoSomething(x);
},
someArgument);`
```
**Question:** How to access/fill global options in this case?
Contributor guide
Assessment
This issue has not been assessed yet.