summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreinfachIrgendwer0815 <85333734+einfachIrgendwer0815@users.noreply.github.com>2024-02-24 14:02:27 +0100
committereinfachIrgendwer0815 <85333734+einfachIrgendwer0815@users.noreply.github.com>2024-02-24 14:02:27 +0100
commit83b00bc653130cfbcc75b4a3bbfb2ffe6af85d8e (patch)
tree890bca843b496cdaabd67f77ae1f172522f8058b
parentf041ff8c5f986e9e83a85615df86cbaf90ac79e0 (diff)
Rename `--squeeze` to `--squeeze-blank`
-rw-r--r--doc/long-help.txt2
-rw-r--r--doc/short-help.txt2
-rw-r--r--src/bin/bat/app.rs2
-rw-r--r--src/bin/bat/clap_app.rs4
-rw-r--r--tests/integration_tests.rs16
5 files changed, 13 insertions, 13 deletions
diff --git a/doc/long-help.txt b/doc/long-help.txt
index 1044bee9..a6ffe962 100644
--- a/doc/long-help.txt
+++ b/doc/long-help.txt
@@ -116,7 +116,7 @@ Options:
--list-themes
Display a list of supported themes for syntax highlighting.
- -s, --squeeze
+ -s, --squeeze-blank
Squeeze consecutive empty lines into a single empty line.
--squeeze-limit <squeeze-limit>
diff --git a/doc/short-help.txt b/doc/short-help.txt
index 52943465..305bbf3d 100644
--- a/doc/short-help.txt
+++ b/doc/short-help.txt
@@ -43,7 +43,7 @@ Options:
Set the color theme for syntax highlighting.
--list-themes
Display all supported highlighting themes.
- -s, --squeeze
+ -s, --squeeze-blank
Squeeze consecutive empty lines.
--style <components>
Comma-separated list of style elements to display (*default*, auto, full, plain, changes,
diff --git a/src/bin/bat/app.rs b/src/bin/bat/app.rs
index f462ce8d..c382975e 100644
--- a/src/bin/bat/app.rs
+++ b/src/bin/bat/app.rs
@@ -290,7 +290,7 @@ impl App {
#[cfg(feature = "lessopen")]
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") {
+ squeeze_lines: if self.matches.get_flag("squeeze-blank") {
Some(
self.matches
.get_one::<usize>("squeeze-limit")
diff --git a/src/bin/bat/clap_app.rs b/src/bin/bat/clap_app.rs
index cfb9d054..ac7f5c18 100644
--- a/src/bin/bat/clap_app.rs
+++ b/src/bin/bat/clap_app.rs
@@ -388,8 +388,8 @@ pub fn build_app(interactive_output: bool) -> Command {
.long_help("Display a list of supported themes for syntax highlighting."),
)
.arg(
- Arg::new("squeeze")
- .long("squeeze")
+ Arg::new("squeeze-blank")
+ .long("squeeze-blank")
.short('s')
.action(ArgAction::SetTrue)
.help("Squeeze consecutive empty lines.")
diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs
index 4d595031..61537bee 100644
--- a/tests/integration_tests.rs
+++ b/tests/integration_tests.rs
@@ -209,20 +209,20 @@ fn line_range_multiple() {
}
#[test]
-fn squeeze() {
+fn squeeze_blank() {
bat()
.arg("empty_lines.txt")
- .arg("--squeeze")
+ .arg("--squeeze-blank")
.assert()
.success()
.stdout("line 1\n\nline 5\n\nline 20\nline 21\n\nline 24\n\nline 26\n\nline 30\n");
}
#[test]
-fn squeeze_line_numbers() {
+fn squeeze_blank_line_numbers() {
bat()
.arg("empty_lines.txt")
- .arg("--squeeze")
+ .arg("--squeeze-blank")
.arg("--decorations=always")
.arg("--number")
.assert()
@@ -234,7 +234,7 @@ fn squeeze_line_numbers() {
fn squeeze_limit() {
bat()
.arg("empty_lines.txt")
- .arg("--squeeze")
+ .arg("--squeeze-blank")
.arg("--squeeze-limit=2")
.assert()
.success()
@@ -242,7 +242,7 @@ fn squeeze_limit() {
bat()
.arg("empty_lines.txt")
- .arg("--squeeze")
+ .arg("--squeeze-blank")
.arg("--squeeze-limit=5")
.assert()
.success()
@@ -253,7 +253,7 @@ fn squeeze_limit() {
fn squeeze_limit_line_numbers() {
bat()
.arg("empty_lines.txt")
- .arg("--squeeze")
+ .arg("--squeeze-blank")
.arg("--squeeze-limit=2")
.arg("--decorations=always")
.arg("--number")
@@ -263,7 +263,7 @@ fn squeeze_limit_line_numbers() {
bat()
.arg("empty_lines.txt")
- .arg("--squeeze")
+ .arg("--squeeze-blank")
.arg("--squeeze-limit=5")
.arg("--decorations=always")
.arg("--number")