1
0
mirror of https://github.com/sharkdp/bat synced 2026-08-10 20:01:45 +00:00

Add --squeeze-limit to specify max number of consecutive empty lines

Co-authored-by: einfachIrgendwer0815 <85333734+einfachIrgendwer0815@users.noreply.github.com>
This commit is contained in:
Ethan P
2020-12-16 18:23:14 -08:00
committed by einfachIrgendwer0815
parent 0c7e5299bf
commit 0e4e10edb6
5 changed files with 18 additions and 7 deletions
+7 -2
View File
@@ -291,9 +291,14 @@ impl App {
use_lessopen: self.matches.get_flag("lessopen"),
set_terminal_title: self.matches.get_flag("set-terminal-title"),
squeeze_lines: if self.matches.get_flag("squeeze") {
1
Some(
self.matches
.get_one::<usize>("squeeze-limit")
.map(|limit| limit.to_owned())
.unwrap_or(1),
)
} else {
0
None
},
})
}