1# Collection of examples "how to use `clap_derive`" 2 3### [Help on the bottom](after_help.rs) 4 5How to append a postscript to the help message generated. 6 7### [Arg Enum](arg_enum.rs) 8 9How to use `ArgEnum` 10 11### [At least N](at_least_two.rs) 12 13How to require presence of at least N values, like `val1 val2 ... valN ... valM`. 14 15### [Basic](basic.rs) 16 17A basic example how to use `clap_derive`. 18 19### [Deny missing docs](deny_missing_docs.rs) 20 21**This is not an example but a test**, it should be moved to `tests` folder 22as soon as [this](https://github.com/rust-lang/rust/issues/24584) is fixed (if ever). 23 24### [Doc comments](doc_comments.rs) 25 26How to use doc comments in place of `help/long_help`. 27 28### [Arguments of subcommands in separate `struct`](enum_tuple.rs) 29 30How to extract subcommands' args into external structs. 31 32### [Environment variables](env.rs) 33 34How to use environment variable fallback an how it interacts with `default_value`. 35 36### [Advanced](example.rs) 37 38Somewhat complex example of usage of `clap_derive`. 39 40### [Flatten](flatten.rs) 41 42How to use `#[clap(flatten)]` 43 44### [Git](git.rs) 45 46Pseudo-`git` example, shows how to use subcommands and how to document them. 47 48### [Groups](group.rs) 49 50Using `clap::Arg::group` with `clap`. 51 52### [`key=value` pairs](keyvalue.rs) 53 54How to parse `key=value` pairs. 55 56### [`--no-*` flags](negative_flag.rs) 57 58How to add `no-thing` flag which is `true` by default and `false` if passed. 59 60### [Rename all](rename_all.rs) 61 62How `#[clap(rename_all)]` works. 63 64### [Skip](skip.rs) 65 66How to use `#[clap(skip)]`. 67 68### [Aliases](subcommand_aliases.rs) 69 70How to use aliases 71 72### [`true` or `false`](true_or_false.rs) 73 74How to express "`"true"` or `"false"` argument. 75 76### [Author, description, and version from `Cargo.toml`](from_crate.rs) 77 78How to derive the author, description, and version from Cargo.toml 79 80### [Value hints for shell completion](value_hints_derive.rs) 81 82How to provide `ValueHint` attributes and generate shell completion files. 83