From f041ff8c5f986e9e83a85615df86cbaf90ac79e0 Mon Sep 17 00:00:00 2001 From: einfachIrgendwer0815 <85333734+einfachIrgendwer0815@users.noreply.github.com> Date: Sat, 24 Feb 2024 13:57:44 +0100 Subject: [PATCH] Hide `--squeeze-limit` from short help --- doc/short-help.txt | 2 -- src/bin/bat/clap_app.rs | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/doc/short-help.txt b/doc/short-help.txt index 3f19b94d..52943465 100644 --- a/doc/short-help.txt +++ b/doc/short-help.txt @@ -45,8 +45,6 @@ Options: Display all supported highlighting themes. -s, --squeeze Squeeze consecutive empty lines. - --squeeze-limit - The maximum number of consecutive empty lines. --style Comma-separated list of style elements to display (*default*, auto, full, plain, changes, header, header-filename, header-filesize, grid, rule, numbers, snip). diff --git a/src/bin/bat/clap_app.rs b/src/bin/bat/clap_app.rs index 0c28ce7d..cfb9d054 100644 --- a/src/bin/bat/clap_app.rs +++ b/src/bin/bat/clap_app.rs @@ -399,8 +399,8 @@ pub fn build_app(interactive_output: bool) -> Command { Arg::new("squeeze-limit") .long("squeeze-limit") .value_parser(|s: &str| s.parse::().map_err(|_| "Requires a non-negative number".to_owned())) - .help("The maximum number of consecutive empty lines.") .long_help("Set the maximum number of consecutive empty lines to be printed.") + .hide_short_help(true) ) .arg( Arg::new("style")