1
0
mirror of https://github.com/sharkdp/bat synced 2026-08-02 18:41:42 +00:00

Add new style component to separate multiple '--line-range's

This commit is contained in:
Ethan P
2019-05-24 18:24:13 -07:00
committed by David Peter
parent e289a2c698
commit 7f2e61d579
4 changed files with 76 additions and 3 deletions
+3 -3
View File
@@ -111,7 +111,7 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
.validator(|val| {
let mut invalid_vals = val.split(',').filter(|style| {
!&[
"auto", "full", "plain", "changes", "header", "grid", "numbers",
"auto", "full", "plain", "changes", "header", "grid", "numbers", "snip"
]
.contains(style)
});
@@ -124,7 +124,7 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
})
.help(
"Comma-separated list of style elements to display \
(*auto*, full, plain, changes, header, grid, numbers).",
(*auto*, full, plain, changes, header, grid, numbers, snip).",
)
.long_help(
"Configure which elements (line numbers, file headers, grid \
@@ -134,7 +134,7 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
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=\"..\"). \
Possible values: *auto*, full, plain, changes, header, grid, numbers.",
Possible values: *auto*, full, plain, changes, header, grid, numbers, snip.",
),
)
.arg(