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

Code before:
        )
        .arg(
            Arg::with_name("config-dir")
                .long("config-dir")
                .hidden(true)
                .help("Show bat's configuration directory."),
        )
        .arg(
            Arg::with_name("cache-dir")
                .long("cache-dir")
                .hidden(true)
                .help("Show bat's cache directory."),
        )
        .arg(
            Arg::with_name("diagnostic")
                .long("diagnostic")
                .alias("diagnostics")
                .hidden_short_help(true)
                .help("Show diagnostic information for bug reports.")
        )
        .arg(
            Arg::with_name("ignored-suffix")
                .number_of_values(1)
                .multiple(true)
                .takes_value(true)
                .long("ignored-suffix")
                .help(
                    "Ignore extension. For example:\n  \
                    'bat --ignored-suffix \".dev\" my_file.json.dev' will use JSON syntax, and ignore '.dev'"
                )
        )
        .help_message("Print this help message.")
        .version_message("Show version information.");

    // Check if the current directory contains a file name cache. Otherwise,
    // enable the 'bat cache' subcommand.
    if Path::new("cache").exists() {
        app
    } else {
        app.subcommand(
            SubCommand::with_name("cache")
                .about("Modify the syntax-definition and theme cache")
                .arg(
                    Arg::with_name("build")
                        .long("build")
                        .short("b")
                        .help("Initialize (or update) the syntax/theme cache.")
                        .long_help(
                            "Initialize (or update) the syntax/theme cache by loading from \
                             the source directory (default: the configuration directory).",
                        ),

Review comment (suggestion):
I think we should consider making this `.hidden_short_help(true)`, such that we only show it on `bat --help`, but not for `bat -h` (which should only show the most commonly used options).

Code after:
        )
        .arg(
            Arg::with_name("config-dir")
                .long("config-dir")
                .hidden(true)
                .help("Show bat's configuration directory."),
        )
        .arg(
            Arg::with_name("cache-dir")
                .long("cache-dir")
                .hidden(true)
                .help("Show bat's cache directory."),
        )
        .arg(
            Arg::with_name("diagnostic")
                .long("diagnostic")
                .alias("diagnostics")
                .hidden_short_help(true)
                .help("Show diagnostic information for bug reports.")
        )
        .arg(
            Arg::with_name("ignored-suffix")
                .number_of_values(1)
                .multiple(true)
                .takes_value(true)
                .long("ignored-suffix")
                .hidden_short_help(true)
                .help(
                    "Ignore extension. For example:\n  \
                    'bat --ignored-suffix \".dev\" my_file.json.dev' will use JSON syntax, and ignore '.dev'"
                )
        )
        .help_message("Print this help message.")
        .version_message("Show version information.");

    // Check if the current directory contains a file name cache. Otherwise,
    // enable the 'bat cache' subcommand.
    if Path::new("cache").exists() {
        app
    } else {
        app.subcommand(
            SubCommand::with_name("cache")
                .about("Modify the syntax-definition and theme cache")
                .arg(
                    Arg::with_name("build")
                        .long("build")
                        .short("b")
                        .help("Initialize (or update) the syntax/theme cache.")
                        .long_help(
                            "Initialize (or update) the syntax/theme cache by loading from \
                             the source directory (default: the configuration directory).",