Skip to content
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

Does "Core" assume that arguments 'Always' have to be ordered? #27

Closed
MarkMichaelis opened this issue May 9, 2018 · 3 comments
Closed
Labels
needs discussion Further discussion required

Comments

@MarkMichaelis
Copy link
Contributor

Given getuser.exe <username> <age>, two or more arguments, where age can only be an integer and username cannot be an integer, do we provide any functionality try to coerce into username and age values regardless of argument order?

Note:

  • It is possible to sometimes programmatically determine the order.
  • If we can't determine the order we can report an error that arguments are ambiguous.
  • The programmer can always convert the arguments to a string array (or two string arguments) and then address order independently from us.
@MarkMichaelis MarkMichaelis added the needs discussion Further discussion required label May 9, 2018
@jonsequitur
Copy link
Contributor

jonsequitur commented May 9, 2018

ParseResult.Tokens provides the ordered array of strings that were parsed, so this approach can be layered on top of the existing core library. (Currently, the only ordering assumption is that arguments apply to the closest eligible option or subcommand to their left.)

@MarkMichaelis
Copy link
Contributor Author

As discussed with @jonsequitur and @Keboo:
We will try to support option arguments where given no option name, we will determine the name based option position within the command.

@MarkMichaelis
Copy link
Contributor Author

Duplicate of #29.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs discussion Further discussion required
Projects
None yet
Development

No branches or pull requests

2 participants