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

Option that allows additional parameters #54

Open
kvchernyaev opened this issue Jan 9, 2018 · 4 comments
Open

Option that allows additional parameters #54

kvchernyaev opened this issue Jan 9, 2018 · 4 comments

Comments

@kvchernyaev
Copy link

The existing option
AdditionalArgumentsSettings.AcceptAdditionalArguments = true
throws an exception UnknownArgumentException if a not defined parameter passed.
I need an option to allow unknown arguments.

@j-maly
Copy link
Owner

j-maly commented Jan 9, 2018

Check out https://github.com/j-maly/CommandLineParser/wiki/Command-line-format
AcceptAdditionalArguments allows to verify parameters not starting with - or --, like the directories in this example:
Finder.exe -s 3 --distinct directory1 directory2 directory3

If you want to allow unkown arguments starting with - or --, this is not supported.

@kvchernyaev
Copy link
Author

Can i do it myself and make pull request?
I want to allow (by option) parameters

  1. obsoleted and excluded from source code
  2. like -Dname=val so pairs (name,val) can be used as not strictly defined configuration

@j-maly
Copy link
Owner

j-maly commented Jan 10, 2018

Sounds interesting, sure, I am happy to accept pull requests

@alexandre-lecoq
Copy link
Contributor

Maybe that should be done in

public Argument LookupArgument(string argName)

Such that LookupArgument() should return a new instance of an Argument derived type if no argument is found ?

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

No branches or pull requests

3 participants