mirror of
https://github.com/sharkdp/bat.git
synced 2024-11-24 16:53:55 +01:00
Rename --squeeze
to --squeeze-blank
This commit is contained in:
parent
f041ff8c5f
commit
83b00bc653
@ -116,7 +116,7 @@ Options:
|
|||||||
--list-themes
|
--list-themes
|
||||||
Display a list of supported themes for syntax highlighting.
|
Display a list of supported themes for syntax highlighting.
|
||||||
|
|
||||||
-s, --squeeze
|
-s, --squeeze-blank
|
||||||
Squeeze consecutive empty lines into a single empty line.
|
Squeeze consecutive empty lines into a single empty line.
|
||||||
|
|
||||||
--squeeze-limit <squeeze-limit>
|
--squeeze-limit <squeeze-limit>
|
||||||
|
@ -43,7 +43,7 @@ Options:
|
|||||||
Set the color theme for syntax highlighting.
|
Set the color theme for syntax highlighting.
|
||||||
--list-themes
|
--list-themes
|
||||||
Display all supported highlighting themes.
|
Display all supported highlighting themes.
|
||||||
-s, --squeeze
|
-s, --squeeze-blank
|
||||||
Squeeze consecutive empty lines.
|
Squeeze consecutive empty lines.
|
||||||
--style <components>
|
--style <components>
|
||||||
Comma-separated list of style elements to display (*default*, auto, full, plain, changes,
|
Comma-separated list of style elements to display (*default*, auto, full, plain, changes,
|
||||||
|
@ -290,7 +290,7 @@ impl App {
|
|||||||
#[cfg(feature = "lessopen")]
|
#[cfg(feature = "lessopen")]
|
||||||
use_lessopen: self.matches.get_flag("lessopen"),
|
use_lessopen: self.matches.get_flag("lessopen"),
|
||||||
set_terminal_title: self.matches.get_flag("set-terminal-title"),
|
set_terminal_title: self.matches.get_flag("set-terminal-title"),
|
||||||
squeeze_lines: if self.matches.get_flag("squeeze") {
|
squeeze_lines: if self.matches.get_flag("squeeze-blank") {
|
||||||
Some(
|
Some(
|
||||||
self.matches
|
self.matches
|
||||||
.get_one::<usize>("squeeze-limit")
|
.get_one::<usize>("squeeze-limit")
|
||||||
|
@ -388,8 +388,8 @@ pub fn build_app(interactive_output: bool) -> Command {
|
|||||||
.long_help("Display a list of supported themes for syntax highlighting."),
|
.long_help("Display a list of supported themes for syntax highlighting."),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new("squeeze")
|
Arg::new("squeeze-blank")
|
||||||
.long("squeeze")
|
.long("squeeze-blank")
|
||||||
.short('s')
|
.short('s')
|
||||||
.action(ArgAction::SetTrue)
|
.action(ArgAction::SetTrue)
|
||||||
.help("Squeeze consecutive empty lines.")
|
.help("Squeeze consecutive empty lines.")
|
||||||
|
@ -209,20 +209,20 @@ fn line_range_multiple() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn squeeze() {
|
fn squeeze_blank() {
|
||||||
bat()
|
bat()
|
||||||
.arg("empty_lines.txt")
|
.arg("empty_lines.txt")
|
||||||
.arg("--squeeze")
|
.arg("--squeeze-blank")
|
||||||
.assert()
|
.assert()
|
||||||
.success()
|
.success()
|
||||||
.stdout("line 1\n\nline 5\n\nline 20\nline 21\n\nline 24\n\nline 26\n\nline 30\n");
|
.stdout("line 1\n\nline 5\n\nline 20\nline 21\n\nline 24\n\nline 26\n\nline 30\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn squeeze_line_numbers() {
|
fn squeeze_blank_line_numbers() {
|
||||||
bat()
|
bat()
|
||||||
.arg("empty_lines.txt")
|
.arg("empty_lines.txt")
|
||||||
.arg("--squeeze")
|
.arg("--squeeze-blank")
|
||||||
.arg("--decorations=always")
|
.arg("--decorations=always")
|
||||||
.arg("--number")
|
.arg("--number")
|
||||||
.assert()
|
.assert()
|
||||||
@ -234,7 +234,7 @@ fn squeeze_line_numbers() {
|
|||||||
fn squeeze_limit() {
|
fn squeeze_limit() {
|
||||||
bat()
|
bat()
|
||||||
.arg("empty_lines.txt")
|
.arg("empty_lines.txt")
|
||||||
.arg("--squeeze")
|
.arg("--squeeze-blank")
|
||||||
.arg("--squeeze-limit=2")
|
.arg("--squeeze-limit=2")
|
||||||
.assert()
|
.assert()
|
||||||
.success()
|
.success()
|
||||||
@ -242,7 +242,7 @@ fn squeeze_limit() {
|
|||||||
|
|
||||||
bat()
|
bat()
|
||||||
.arg("empty_lines.txt")
|
.arg("empty_lines.txt")
|
||||||
.arg("--squeeze")
|
.arg("--squeeze-blank")
|
||||||
.arg("--squeeze-limit=5")
|
.arg("--squeeze-limit=5")
|
||||||
.assert()
|
.assert()
|
||||||
.success()
|
.success()
|
||||||
@ -253,7 +253,7 @@ fn squeeze_limit() {
|
|||||||
fn squeeze_limit_line_numbers() {
|
fn squeeze_limit_line_numbers() {
|
||||||
bat()
|
bat()
|
||||||
.arg("empty_lines.txt")
|
.arg("empty_lines.txt")
|
||||||
.arg("--squeeze")
|
.arg("--squeeze-blank")
|
||||||
.arg("--squeeze-limit=2")
|
.arg("--squeeze-limit=2")
|
||||||
.arg("--decorations=always")
|
.arg("--decorations=always")
|
||||||
.arg("--number")
|
.arg("--number")
|
||||||
@ -263,7 +263,7 @@ fn squeeze_limit_line_numbers() {
|
|||||||
|
|
||||||
bat()
|
bat()
|
||||||
.arg("empty_lines.txt")
|
.arg("empty_lines.txt")
|
||||||
.arg("--squeeze")
|
.arg("--squeeze-blank")
|
||||||
.arg("--squeeze-limit=5")
|
.arg("--squeeze-limit=5")
|
||||||
.arg("--decorations=always")
|
.arg("--decorations=always")
|
||||||
.arg("--number")
|
.arg("--number")
|
||||||
|
Loading…
Reference in New Issue
Block a user