tangled
alpha
login
or
join now
tgirl.cloud
/
lix-diff
0
fork
atom
this repo has no description
0
fork
atom
overview
issues
pulls
pipelines
feat: no_header
isabelroses.com
2 days ago
e900deae
9db8e537
+19
-13
3 changed files
expand all
collapse all
unified
split
Cargo.lock
Cargo.toml
src
main.rs
+1
-1
Cargo.lock
···
337
337
338
338
[[package]]
339
339
name = "lix-diff"
340
340
-
version = "1.2.0"
340
340
+
version = "1.3.0"
341
341
dependencies = [
342
342
"clap",
343
343
"color-eyre",
+1
-1
Cargo.toml
···
1
1
[package]
2
2
name = "lix-diff"
3
3
-
version = "1.2.0"
3
3
+
version = "1.3.0"
4
4
license = "MIT"
5
5
description = "A lix plugin for diffing two generations"
6
6
homepage = "https://github.com/tgirlcloud/lix-diff"
+17
-11
src/main.rs
···
35
35
/// disable colored output (also respects NO_COLOR env var and CI environments)
36
36
#[arg(long)]
37
37
no_color: bool,
38
38
+
39
39
+
/// disable the header showing the generation paths
40
40
+
#[arg(long)]
41
41
+
no_header: bool,
38
42
}
39
43
40
44
fn main() -> Result<()> {
···
74
78
let before_text = format!("<<< {}", before.display());
75
79
let after_text = format!(">>> {}", after.display());
76
80
77
77
-
if color::color_enabled() {
78
78
-
let text_color = if luma().is_ok_and(|luma| luma > 0.6) {
79
79
-
Color::DarkGray
81
81
+
if !args.no_header {
82
82
+
if color::color_enabled() {
83
83
+
let text_color = if luma().is_ok_and(|luma| luma > 0.6) {
84
84
+
Color::DarkGray
85
85
+
} else {
86
86
+
Color::LightGray
87
87
+
};
88
88
+
let arrow_style = Style::new().bold().fg(text_color);
89
89
+
println!("{}", arrow_style.paint(&before_text));
90
90
+
println!("{}\n", arrow_style.paint(&after_text));
80
91
} else {
81
81
-
Color::LightGray
82
82
-
};
83
83
-
let arrow_style = Style::new().bold().fg(text_color);
84
84
-
println!("{}", arrow_style.paint(&before_text));
85
85
-
println!("{}\n", arrow_style.paint(&after_text));
86
86
-
} else {
87
87
-
println!("{before_text}");
88
88
-
println!("{after_text}\n");
92
92
+
println!("{before_text}");
93
93
+
println!("{after_text}\n");
94
94
+
}
89
95
}
90
96
91
97
println!("{packages}");