-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Feat 1013 #1277
Feat 1013 #1277
Conversation
Fix typo in crate documentation
Suppose there is a program that executes another program, then it is convenient to take the arguments of the subprogram after `--`, as illustrated in the 22_stop_parsing_with_--.rs example. However, if the subprogram itself wants to receive `--`, then clap-rs should allow it. Fixes clap-rs#1161.
Allow nesting of '--'
…elves This allows properly supporting shell aliases and config files. Before, if an option only accepted a single value and that option was set inside an alias, the CLI could never override that value. For instance: ``` $ alias prog='prog --option=value' $ prog --option=other ``` This would cause an error. Now clap gracefully accepts the new value to replace the old value. Closes clap-rs#976
… all args to override themselves Relates to clap-rs#976
…show up as required Prior to this commit if one had two requirements which conflicted with each other, and an error was generated due to a totally seperate argument, BOTH required but conflicting args would show up in the help message as "missing but required" This is now fixed and the *used* required arg shows up, but the conflicting required arg has been dropped. Closes clap-rs#1158
…ouldnt ever have multiple values Prior to this commit, an option with multiple values and that also overrode itself (either manually or via AppSettings::AllArgsOverrideSelf) could never have more than one value. This is fixed as options with multiple values now ignore the override of self. If one wants to have options with overrides of self, *and* multiple values you should set use_delimiter(false) and *not* set multiple(true). Then tell users to use a comma to seperate their values, i.e. `val1,val2`.
style: indent lines
Add "last" to list in Arg::from_yaml
style: changes values->possible values in help messages as well as er…
imp(Deps): doesnt compile ansi_term on Windows since its not used
Before this commit, ansi_term was compiled anytime the `color` feature was used. However, on Windows the `color` feature is ignored. Even so ansi_term was compiled, and just not used. This commit fixes that by only compiling ansi_term on non-Windows targets. Thanks to @retep998 for the gudiance. Closes clap-rs#1155
lazy_static 1.2 requires Rust 1.24.1+ but we support 1.21+
Pin lazy_static to ~1.1
Adding case_insensitive to yaml parsing
That's in preparation of clap-rs#1013: provide option to layout the output of "my_program --help" with the same alignment across sections.
1719137
to
e1c17bd
Compare
@pierrechevalier83 Can you please rebase on master? |
@ldm0 Was this done by your recent alignment fixes? |
Nope, that PR fixes the inconsistent help wrapping. This issue is about consistently align the arguments. |
Apologies if the ball was dropped on this one. I'm going to close as it's been several years. If we need to re-address I'd suggest opening a new PR on the latest master. Although I don't something like this merging until post v3 release since we should be in a feature freeeze. |
Optionally align the arguments across all categories.
This addresses the issue reported in #1013.
It is a compile time option of clap that can be enabled by adding this into one's Cargo.toml
This change is