mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
Fix minor color bug
If we are not using RED then the Color should be the terminal default not 7
This commit is contained in:
+2
-1
@@ -1,6 +1,7 @@
|
|||||||
extern crate ansi_term;
|
extern crate ansi_term;
|
||||||
|
|
||||||
use self::ansi_term::Colour::Fixed;
|
use self::ansi_term::Colour::Fixed;
|
||||||
|
use self::ansi_term::Style;
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
|
|
||||||
static UNITS: [char; 4] = ['T', 'G', 'M', 'K'];
|
static UNITS: [char; 4] = ['T', 'G', 'M', 'K'];
|
||||||
@@ -171,7 +172,7 @@ pub fn format_string(
|
|||||||
if is_biggest {
|
if is_biggest {
|
||||||
Fixed(196).paint(size)
|
Fixed(196).paint(size)
|
||||||
} else {
|
} else {
|
||||||
Fixed(7).paint(size)
|
Style::new().paint(size)
|
||||||
},
|
},
|
||||||
indentation,
|
indentation,
|
||||||
printable_name,
|
printable_name,
|
||||||
|
|||||||
+1
-1
@@ -88,7 +88,7 @@ fn main() {
|
|||||||
let biggest_ones = {
|
let biggest_ones = {
|
||||||
match depth {
|
match depth {
|
||||||
None => find_big_ones(sorted_data, number_of_lines + simplified_dirs.len()),
|
None => find_big_ones(sorted_data, number_of_lines + simplified_dirs.len()),
|
||||||
Some(d) => trim_deep_ones(sorted_data, d, &simplified_dirs)
|
Some(d) => trim_deep_ones(sorted_data, d, &simplified_dirs),
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
draw_it(permissions, !use_full_path, depth, simplified_dirs, biggest_ones);
|
draw_it(permissions, !use_full_path, depth, simplified_dirs, biggest_ones);
|
||||||
|
|||||||
@@ -279,4 +279,3 @@ fn recursive_sym_link_output(dir: &str, link_name: &str) -> String {
|
|||||||
format_string(link_name, true, true, " 0B", " └──",),
|
format_string(link_name, true, true, " 0B", " └──",),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user