From 04e2f6378ed4c98e936dd2b7b75272182381e749 Mon Sep 17 00:00:00 2001 From: David Peter Date: Wed, 15 Mar 2023 10:05:57 +0100 Subject: [PATCH] Help text wrapping --- Cargo.toml | 2 +- src/cli.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f79d8f2..76bdb08 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,7 +43,7 @@ once_cell = "1.17" nix = { version = "0.26.2", features = ["zerocopy"] } [dependencies.clap] -version = "4.0.18" +version = "4" default-features = false features = ["suggestions", "color", "wrap_help", "cargo", "help", "usage", "error-context"] diff --git a/src/cli.rs b/src/cli.rs index a51dbf7..9fe3bdf 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -21,6 +21,7 @@ fn build_command() -> Command { .hide_possible_values(true) .about("A command-line benchmarking tool.") .help_expected(true) + .term_width(100) .arg( Arg::new("command") .help("The command to benchmark. This can be the name of an executable, a command \ @@ -294,7 +295,7 @@ fn build_command() -> Command { Arg::new("input") .long("input") .action(ArgAction::Set) - .number_of_values(1) + .num_args(1) .value_name("WHERE") .help("Control where the input of the benchmark comes from.\n\ \n\