Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #60 #284
The main corner case I'm considering in this PR is when there are arguments like
-4,-6defined as flags, as inThere are a few core linux utilities such as
pingthat set a precedent for having numeric flags like this, so it's a case I do want to support. However, supporting this means that if you have an argument struct like this:and you write on the command line
./program --floats -1.2 -3.4 -6, then there's a question of whether the last-6should go into Floats or into UseIPv6 in this example.What this PR implements is that if you have a numeric flag like UseIPv6 in the above example, then that will take precedence, but otherwise
-6will be treated as a number and put into Floats.This is only implemented for arguments, not positional, in this PR. Here are some test cases that should give a sense of what's implemented: