Repository: sharkdp/bat
File: src/bin/bat/clap_app.rs (Rust)

Code before:
            .help("Set the tab width to T spaces.")
            .long_help(
                "Set the tab width to T spaces. Use a width of 0 to pass tabs through \
                     directly",
            ),
    )
        .arg(
            Arg::new("wrap")
                .long("wrap")
                .overrides_with("wrap")
                .takes_value(true)
                .value_name("mode")
                .value_parser(["auto", "never", "character"])
                .default_value("auto")
                .hide_default_value(true)
                .help("Specify the text-wrapping mode (*auto*, never, character).")
                .long_help("Specify the text-wrapping mode (*auto*, never, character). \
                           The '--terminal-width' option can be used in addition to \
                           control the output width."),
        )
        .arg(
            Arg::new("chop-long-lines")
                .long("chop-long-lines")
                .short('S')
                .takes_value(false)
                .help("Truncate all lines longer than screen width. Alias for '--wrap=character'."),
        )
        .arg(
            Arg::new("terminal-width")
                .long("terminal-width")
                .takes_value(true)
                .value_name("width")
                .hide_short_help(true)
                .allow_hyphen_values(true)
                .value_parser(
                    |t: &str| {
                        let is_offset = t.starts_with('+') || t.starts_with('-');
                        t.parse::<i32>()
                            .map_err(|_e| "must be an offset or number")
                            .and_then(|v| if v == 0 && !is_offset {
                                Err("terminal width cannot be zero")
                            } else {
                                Ok(t.to_owned())
                            })
                            .map_err(|e| e.to_string())
                    })
                .help(
                    "Explicitly set the width of the terminal instead of determining it \
                     automatically. If prefixed with '+' or '-', the value will be treated \
                     as an offset to the actual terminal width. See also: '--wrap'.",
                ),

Review comment (suggestion):
```suggestion
                .help("Truncate all lines longer than screen width. Alias for '--wrap=never'."),
```

Code after:
            .help("Set the tab width to T spaces.")
            .long_help(
                "Set the tab width to T spaces. Use a width of 0 to pass tabs through \
                     directly",
            ),
    )
        .arg(
            Arg::new("wrap")
                .long("wrap")
                .overrides_with("wrap")
                .takes_value(true)
                .value_name("mode")
                .value_parser(["auto", "never", "character"])
                .default_value("auto")
                .hide_default_value(true)
                .help("Specify the text-wrapping mode (*auto*, never, character).")
                .long_help("Specify the text-wrapping mode (*auto*, never, character). \
                           The '--terminal-width' option can be used in addition to \
                           control the output width."),
        )
        .arg(
            Arg::new("chop-long-lines")
                .long("chop-long-lines")
                .short('S')
                .takes_value(false)
                .help("Truncate all lines longer than screen width. Alias for '--wrap=never'."),
        )
        .arg(
            Arg::new("terminal-width")
                .long("terminal-width")
                .takes_value(true)
                .value_name("width")
                .hide_short_help(true)
                .allow_hyphen_values(true)
                .value_parser(
                    |t: &str| {
                        let is_offset = t.starts_with('+') || t.starts_with('-');
                        t.parse::<i32>()
                            .map_err(|_e| "must be an offset or number")
                            .and_then(|v| if v == 0 && !is_offset {
                                Err("terminal width cannot be zero")
                            } else {
                                Ok(t.to_owned())
                            })
                            .map_err(|e| e.to_string())
                    })
                .help(
                    "Explicitly set the width of the terminal instead of determining it \
                     automatically. If prefixed with '+' or '-', the value will be treated \
                     as an offset to the actual terminal width. See also: '--wrap'.",
                ),