You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I run my application with --fm D,C a.txt arguments, it says that option 'fm' is defined with a bad format. If I put any option between 'fm' and the value list, for example, --fm D,C -q a.txt, it is parsed successfully. You can check it in a fiddle: https://dotnetfiddle.net/yt5L9K
The text was updated successfully, but these errors were encountered:
This is caused by the fact that IEnumerable options try to grab every subsequent non-option argument that follows them, regardless of whether it makes sense, which is why it's grabbing the a.txt and trying to parse that as an FMode enum. I believe that this is non-intuitive behavior and that the way IEnumerable options should work should be changed as follows:
If there is no separator given, grab all available non-option args
If a separator is given, but the next non-option arg doesn't contain the separator, continue to grab all available non-option args
If a separator is given, and the next non-option arg contains the separator, STOP and don't grab any further values (this would be new behavior)
Currently the code follows the first two of those rules, but not the third.
I have such options:
If I run my application with
--fm D,C a.txt
arguments, it says that option 'fm' is defined with a bad format. If I put any option between 'fm' and the value list, for example,--fm D,C -q a.txt
, it is parsed successfully. You can check it in a fiddle: https://dotnetfiddle.net/yt5L9KThe text was updated successfully, but these errors were encountered: