Skip to content

Commit aa62542

Browse files
committed
Update branch for merging
2 parents 483faa6 + c94676c commit aa62542

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Onefetch is a command-line Git information tool written in `Rust` that will disp
1919

2020
By default, the repo's information is displayed alongside the dominant language's ASCII logo, but you can further configure Onefetch to instead display an image - on supported terminals (more info [here](https://github.com/o2sh/onefetch/wiki/Images-in-the-terminal)) -, a text input or nothing at all.
2121

22-
It automatically detects open source licenses from texts and provides the user with various information like code distribution, pending changes, top contributors (by number of commits), size on disk, creation date, version, HEAD, last change, LOC (lines of code), etc.
22+
It automatically detects open source licenses from texts and provides the user with various information like code distribution, pending changes, dependencies, top contributors (by number of commits), size on disk, creation date, version, HEAD, last change, LOC (lines of code), etc.
2323

2424
<img src="assets/go.png" align="right" height="240px">
2525

assets/go.png

28.1 KB
Loading

assets/linux.png

17.4 KB
Loading

src/onefetch/cli.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ impl Cli {
129129
"Changes the text colors (X X X...). \
130130
Goes in order of title, ~, underline, subtitle, colon, and info. \
131131
For example:\n \
132-
'--text-color 9 10 11 12 13 14'"
132+
'--text-colors 9 10 11 12 13 14'"
133133
)
134134
)
135135
.arg(

src/onefetch/info.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub struct Info {
2525
commits: String,
2626
pending: String,
2727
repo_size: String,
28-
number_of_lines: usize,
28+
lines_of_code: usize,
2929
number_of_tags: usize,
3030
number_of_branches: usize,
3131
license: String,
@@ -167,9 +167,9 @@ impl std::fmt::Display for Info {
167167
if !self.config.disabled_fields.lines_of_code {
168168
writeln!(
169169
f,
170-
"{} {}",
170+
"{}{}",
171171
&self.get_formatted_subtitle_label("Lines of code"),
172-
&self.number_of_lines.to_string().color(self.color_set.info),
172+
&self.lines_of_code.to_string().color(self.color_set.info),
173173
)?;
174174
}
175175

@@ -216,7 +216,7 @@ impl Info {
216216
.chain_err(|| "Could not find a valid git repo on the current path")?;
217217
let workdir = repo.workdir().chain_err(|| "Unable to run onefetch on bare git repo")?;
218218
let workdir_str = workdir.to_str().unwrap();
219-
let (languages_stats, number_of_lines) =
219+
let (languages_stats, lines_of_code) =
220220
Language::get_language_statistics(workdir_str, &config.excluded)?;
221221
let git_history = Info::get_git_history(workdir_str, config.no_merges);
222222
let (number_of_tags, number_of_branches) = Info::get_number_of_tags_branches(workdir_str);
@@ -257,7 +257,7 @@ impl Info {
257257
commits: number_of_commits,
258258
pending: pending?,
259259
repo_size: repo_size?,
260-
number_of_lines,
260+
lines_of_code,
261261
number_of_tags,
262262
number_of_branches,
263263
license: project_license?,

src/onefetch/text_color.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ impl TextColor {
1616
tilde: Color::White,
1717
underline: Color::White,
1818
subtitle: color,
19-
colon: color,
19+
colon: Color::White,
2020
info: Color::White,
2121
}
2222
}
@@ -39,7 +39,7 @@ impl TextColor {
3939
text_color_set.tilde = *custom_color.get(1).unwrap_or(&Color::White);
4040
text_color_set.underline = *custom_color.get(2).unwrap_or(&Color::White);
4141
text_color_set.subtitle = *custom_color.get(3).unwrap_or(&default_colors[0]);
42-
text_color_set.colon = *custom_color.get(4).unwrap_or(&default_colors[0]);
42+
text_color_set.colon = *custom_color.get(4).unwrap_or(&Color::White);
4343
text_color_set.info = *custom_color.get(5).unwrap_or(&Color::White);
4444
}
4545

0 commit comments

Comments
 (0)