-
Notifications
You must be signed in to change notification settings - Fork 391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parsing two list arguments doesn't work #584
Comments
What you're seeing is the default behavior because command-line-api/src/System.CommandLine.Tests/ParserTests.MultipleArguments.cs Lines 25 to 53 in 9604cdf
The comma approach is interesting. Do you have examples of command line interfaces using this convention in the way you're describing? Related: #37 |
I can't say anything about existing tools, but PowerShell uses commas for lists, and CLI-tool framework PowerArgs uses this notation as well. |
I don't really know/remember any wide used tools with such approach, but in past I used to use argparse lib for python, which has such concept. |
I'm closing this as a duplicate of #37. Please feel free to reopen if there are details I'm missing. |
Invoking following command definition as
"do-stuff args1 args2"
results in arg1 with both values and arg2 as null in CommandHandler - I expected args1 in arg1 list and args2 in arg2 list, is there any option to specify that spaces are delimiters for arguments and let say commas for items in list so invoking"do-stuff args1a,args1b args2"
result in arg1 list with two items (args1a, args1b) and arg2 list with only one item (args2).The text was updated successfully, but these errors were encountered: