-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add support for automatic numeric ranges #73
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
Labels
A-parsing
Area: Parser's logic and needs it changed somehow.
Comments
This is going to be postponed until a better solution to #72 is determined. For this issue in particular (Ranges), I'm envisioning going along with an // Defined in clap:
enum ArgType {
Int,
Float,
Range(i64, i64) // high,low
}
// user code:
let arg = Arg::with_name("some-range").index(1).type(ArgType::Range(0,5)); But we'll see... |
Closed for now... |
This is somewhat possible now with #174 being merged, but its still mostly manual. Once we add some generic preconceived arg validations this may be closed. |
validators serve this purpose fine. Closing. |
Marwes
added a commit
to Marwes/clap-rs
that referenced
this issue
Jul 7, 2017
All the other features are either irrelevant, for nightly or already included by default so this should build with all features. https://github.com/onur/docs.rs/pull/73 Fixes clap-rs#73
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In addition to #72 something akin to validating numeric ranges goes along nicely with Specific Value Sets. Perhaps a type of
Range
? Thinking out loud...The text was updated successfully, but these errors were encountered: