Closed lefth closed 2 years ago
structopt can't document all clap, the user should read clap documentation.
I accept a PR with an example with allow_hyphen_values, with an intelligible name.
I didn't realize allow_hyphen_values wasn't a structopt option. Indeed, documenting this is not structopt's responsibility.
Would you like a PR that adds a hyperlink to the clap API docs in the raw methods section? I suggest this because as a new user (not having used clap either), I read the full documentation but didn't realize that complex stuff was expected to be done with the clap API. "See also the [link]clap API[/link]" might hammer that point home.
Sure.
We tried to be explicit about that, but if you have any idea to improve the documentation, feel free to open a PR.
#[structopt(allow_hyphen_values = true)]
should be documented, so it's easier for people to see how to pass negative numbers as arguments. Suggestion: "Allow the argument value to start with a hyphen. Needed if negative numbers will be a valid input."