From 5db7516dd9945514c2f6723918bc12e4bddc3946 Mon Sep 17 00:00:00 2001 From: David Peter Date: Wed, 15 Mar 2023 09:08:59 +0100 Subject: [PATCH] Formatting of help text --- src/cli.rs | 46 ++++++++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index c0ae581..4435678 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -274,16 +274,36 @@ fn build_command() -> Command { .action(ArgAction::Set) .value_name("WHERE") .help( - "Control where the output of the benchmark is redirected. can be:\n\n\ - null: Redirect output to /dev/null (the default). \ - Note that some programs like 'grep' detect when standard output is /dev/null \ - and apply certain optimizations. To avoid that, consider using \ - '--output=pipe'.\n\n\ - pipe: Feed the output through a pipe before discarding it.\n\n\ - inherit: Don't redirect the output at all (same as '--show-output').\n\n\ - : Write the output to the given file.", + "Control where the output of the benchmark is redirected. Note \ + that some programs like 'grep' detect when standard output is \ + /dev/null and apply certain optimizations. To avoid that, consider \ + using '--output=pipe'.\n\ + \n\ + can be:\n\ + \n \ + null: Redirect output to /dev/null (the default).\n\ + \n \ + pipe: Feed the output through a pipe before discarding it.\n\ + \n \ + inherit: Don't redirect the output at all (same as '--show-output').\n\ + \n \ + : Write the output to the given file.", ), ) + .arg( + Arg::new("input") + .long("input") + .takes_value(true) + .number_of_values(1) + .value_name("WHERE") + .help("Control where the input of the benchmark comes from.\n\ + \n\ + can be:\n\ + \n \ + null: Read from /dev/null (the default).\n\ + \n \ + : Read the input from the given file."), + ) .arg( Arg::new("command-name") .long("command-name") @@ -312,16 +332,6 @@ fn build_command() -> Command { .hide(true) .help("Enable debug mode which does not actually run commands, but returns fake times when the command is 'sleep