1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
/*!
clap-help is an alternate help printer for applications using clap.
clap-help displays arguments in a more readable format, in a width-aware table and lets you customize the content and style.
Minimal usage:
1. disable the standard clap help printer with `disable_help_flag = true`
2. add your own help flag
3. call `clap_help::print_help` in the handler for your help flag
```rust
use clap::{CommandFactory, Parser, ValueEnum};
use clap_help::Printer;
#[derive(Parser, Debug)]
#[command(name="my_prog", author, version, about, disable_help_flag = true)]
struct Args {
/// Print help
#[arg(long)]
help: bool,
// other arguments
}
fn main() {
let args = Args::parse();
if args.help {
Printer::new(Args::command()).print_help();
return;
}
// rest of the program
}
```
The examples directory shows how to customize the help.
*/
mod printer;
pub use printer::*;