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

Code before:
                            "full",
                            "plain",
                            "header",
                            "header-full",
                            "header-filename",
                            "header-filesize",
                            "header-permissions",
                            "header-lastmodified",
                            "grid",
                            "rule",
                            "numbers",
                            "snip",
                            #[cfg(feature = "git")]
                            "changes",
                        ].contains(style)
                    });

                    if let Some(invalid) = invalid_vals.next() {
                        Err(format!("Unknown style, '{}'", invalid))
                    } else {
                        Ok(())
                    }
                })
                .help(
                    "Comma-separated list of style elements to display \
                     (*auto*, full, plain, changes, header, grid, rule, numbers, snip).",
                )
                .long_help(
                    "Configure which elements (line numbers, file headers, grid \
                     borders, Git modifications, ..) to display in addition to the \
                     file contents. The argument is a comma-separated list of \
                     components to display (e.g. 'numbers,changes,grid') or a \
                     pre-defined style ('full'). To set a default style, add the \
                     '--style=\"..\"' option to the configuration file or export the \
                     BAT_STYLE environment variable (e.g.: export BAT_STYLE=\"..\").\n\n\
                     Possible values:\n\n  \
                     * auto: enables all components and 'header', unless the output is piped.
                     * (default)\n  \
                     * full: enables all available components.\n  \
                     * plain: disables all available components.\n  \
                     * changes: show Git modification markers.\n  \
                     * header: displays the filename and filesize.\n \
                     * header-full: displays all header-* fields.\n \
                     * header-filename: displays the file name.\n  \
                     * header-filesize: displays the size of the file in human-readable format.\n  \
                     * header-last-modified: displays the last modification timestamp of the file.\n  \
                     * header-permissions: displays the file owner, group and mode.\n \
                     * grid: vertical/horizontal lines to separate side bar\n          \
                       and the header from the content.\n  \
                     * rule: horizontal lines to delimit files.\n  \
                     * numbers: show line numbers in the side bar.\n  \

Review comment (suggestion):
Here we have another high level problem. We don't want to make this `auto` by default. But  we don't want `full` as default either since we don't want to show all header fields by default.

So we have two choices now:
1. We only add `header-filename` and `header-filesize` in this PR so we can keep `full` as default, which in turn allows us to postpone this problem to a follow-up PR (this is the option I prefer)
2. We deal with this problem in this PR. Maybe we should add a new variant `recommended` that is default? Or maybe just call the default `default`?

I would like to ask @sharkdp and @keith-hall: Are you OK with starting to show both `header-filename` and `header-filesize` by default? If not, then we might as well go with option 2 right away and skip a potential follow-up PR.

Code after:
                            "full",
                            "plain",
                            "header",
                            "header-filename",
                            "header-filesize",
                            "grid",
                            "rule",
                            "numbers",
                            "snip",
                            #[cfg(feature = "git")]
                            "changes",
                        ].contains(style)
                    });

                    if let Some(invalid) = invalid_vals.next() {
                        Err(format!("Unknown style, '{}'", invalid))
                    } else {
                        Ok(())
                    }
                })
                .help(
                    "Comma-separated list of style elements to display \
                     (*auto*, full, plain, changes, header, grid, rule, numbers, snip).",
                )
                .long_help(
                    "Configure which elements (line numbers, file headers, grid \
                     borders, Git modifications, ..) to display in addition to the \
                     file contents. The argument is a comma-separated list of \
                     components to display (e.g. 'numbers,changes,grid') or a \
                     pre-defined style ('full'). To set a default style, add the \
                     '--style=\"..\"' option to the configuration file or export the \
                     BAT_STYLE environment variable (e.g.: export BAT_STYLE=\"..\").\n\n\
                     Possible values:\n\n  \
                     * full: enables all available components (default).\n  \
                     * auto: same as 'full', unless the output is piped.\n  \
                     * plain: disables all available components.\n  \
                     * changes: show Git modification markers.\n  \
                     * header: alias for 'header-filename'.\n  \
                     * header-filename: show filenames before the content.\n  \
                     * header-filesize: show file sizes before the content.\n  \
                     * grid: vertical/horizontal lines to separate side bar\n          \
                       and the header from the content.\n  \
                     * rule: horizontal lines to delimit files.\n  \
                     * numbers: show line numbers in the side bar.\n  \
                     * snip: draw separation lines between distinct line ranges.",
                ),
        )
        .arg(
            Arg::with_name("line-range")
                .long("line-range")
                .short("r")