-
Notifications
You must be signed in to change notification settings - Fork 40
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Support common '--' notation #13
Comments
True. This isn't common, however, changing this will not only break existing code (which may be acceptable in some cases, using the [Obsolete] attribute for example), it will break existing apps. Breaking existing apps affects users of the app instead of developers and this is not acceptable. myexe login -user=john -pass=foobar Unless a developer updates the myexe code, the script will no longer work. Thanks for the suggestion. I may consider a "CLAP2" and have this supported. |
I agree. First I forgot another benefit: The arguments end market: There are still solutions:
|
Can you please elaborate more on the "end market" you mentioned? |
Everything after a " -- " will never be interpreted as a named parameter. Other than that, it has no effect. For example both are equivalent:
It's useful when you want to make sure that file names that possibly start by "-" or "--" will not be interpreted as optional parameter values. For example this is different
It might not seem that useful at first but for example I use msysgit on Windows. Meaning I can call: NDesk.Options supports that notation. |
I would also like to see this. Or rather the full GNU style standard since I'm porting some Unix based tools to .Net and need to follow that convention. But I'm putting this here rather than creating a new issue. The minimum would be:
I found this project when looking for a verb based parser since I also need to be able to do something like git or mercurial:
If you want, you could check the gnu getopt documentation although I personally find the POSIX specification a bit easier to digest. You have some great code going on here. Maybe it would be enough to create an alternate parser with different rules. Besides, the default behavior can remain totally the same so no implementations are broken. Would you be interested in any contributions regarding this? |
It was a long time since my last contribution to the project. I actually considered it "done" (only bug fixing). Thanks, |
Having '-help' isn't common, it should mean '-h -e -l -p' wereas '--help' should be the long form.
The text was updated successfully, but these errors were encountered: