Passing multiple items to an Option
mrboring opened this issue · comments
Hi
I've been going through your examples and I'm having an issue with Creating a Root Command Parser. It works with multiple -w
. Example:
dotnet run -- -w "aaa" -w "bbb" -w "ccc" -s "#"
How can I get it to work passing multiple values to a single -w
? Example:
dotnet run -- -w "aaa" "bbb" "ccc" -s "#"
I did some searching and found Option.AllowMultipleArguments
, but could not get it to work.
I think I've found the solution by reading further through your examples. It was in Defining Inputs Manually
By using System.CommandLine.Option
I was able to add opt.AllowMultipleArgumentsPerToken <- true
and this worked.
Glad you found a solution. 👍