Commit graph

8 commits

Author SHA1 Message Date
Ed Page
d840d5650e fix(derive)!: Rename Clap to Parser.
Before #2005, `Clap` was a special trait that derived all clap traits it
detected were relevant (including an enum getting both `ArgEnum`,
`Clap`, and `Subcommand`).  Now, we have elevated `Clap`, `Args`,
`Subcommand`, and `ArgEnum` to be user facing but the name `Clap` isn't
very descriptive.

This also helps further clarify the relationships so a crate providing
an item to be `#[clap(flatten)]` or `#[clap(subcommand)]` is more likely
to choose the needed trait to derive.

Also, my proposed fix fo #2785 includes making `App` attributes almost
exclusively for `Clap`.  Clarifying the names/roles will help
communicate this.

For prior discussion, see #2583
2021-10-09 20:12:03 -05:00
patrick-gu
a4dc72ed19 Replace "Prints" with "Print" for default help and version commands 2021-07-29 20:23:25 -07:00
Marti Raudsepp
bc7cc4fbab Add examples for using value_hint with clap_derive
Also tweaked clap_generate example a little.
2020-10-10 00:11:44 +03:00
João Marcos
24760bc261 style: replacing yml with yaml for consistency 2020-07-20 20:58:34 -03:00
bors[bot]
ad5606b5a0
Merge #1678
1678: Refactor clap_generate r=CreepySkeleton a=pksunkara

I have copied the code from [clap_generate]( https://github.com/clap-rs/clap_generate) and refactored the structure a bit.

This new structure will allow people to write their own generators using our `Generator` trait which will contain some helpers (Still working on polishing them).

Co-authored-by: Ole Martin Ruud <barskern@outlook.com>
Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2020-02-08 15:00:50 +00:00
Pavan Kumar Sunkara
33f47acc67 Refactor clap_generate 2020-02-07 07:52:04 +01:00
Pavan Kumar Sunkara
5b3a0dff9c Remove extern & macro_use where possible 2020-02-07 07:34:01 +01:00
Pavan Kumar Sunkara
5e8f424dfe Merged clap_derive using git-subtree 2020-01-18 17:40:07 +05:30