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:
committed by
einfachIrgendwer0815
parent
0c7e5299bf
commit
0e4e10edb6
+7
-2
@@ -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
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user