SimonCahill/getopt.net

DoubleDashStopsParsing is off by default?

Closed this issue · 2 comments

getopt, at least in its GNU incarnation, effectively has DoubleDashStopsParsing hard-coded to true, and supporting myapp -options -- -sillyFilename is one of the selling points for me. Is there a reason to have it set to false by default in this library?

There is no particular reason, I personally felt that it was a good decision. It's happened multiple times that I've accidentally hit the space key when typing arguments and parsing stopped.

But the default behavior is also as you have described on macOS/Darwin.

I don't see any issue with enabling this behavior by default,.

After further consideration, I will set DoubleDashStopsParsing to true by default.
This will ensure default behaviour consistent with getopt; it will still be disableable.

This change will be added in version 0.3.1.

I will close this issue with the next PR.