summaryrefslogtreecommitdiffstats
path: root/src/aggregate.rs
diff options
context:
space:
mode:
authorSebastian Thiel <sthiel@thoughtworks.com>2019-06-01 15:27:17 +0530
committerSebastian Thiel <sthiel@thoughtworks.com>2019-06-01 15:27:44 +0530
commit9d0949933cb46d2e73c047b5f06201dbd75bca1d (patch)
tree16b9341106abc36e72a9e5e0f0f354611af51e42 /src/aggregate.rs
parent498bcd0da4dc44d04634f2cabc245f4c46d2c46a (diff)
Support for colors. Using green, which might be invisible to some!
Probably those who can't see red or green will have configured their terminal to display different colors instead.
Diffstat (limited to 'src/aggregate.rs')
-rw-r--r--src/aggregate.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/aggregate.rs b/src/aggregate.rs
index 2f36171..6079e04 100644
--- a/src/aggregate.rs
+++ b/src/aggregate.rs
@@ -83,10 +83,13 @@ fn write_path(
num_bytes: u64,
num_errors: u64,
) -> Result<(), io::Error> {
+ use termion::color;
writeln!(
out,
- "{:>10}\t{}{}",
+ "{}{:>10}{}\t{}{}",
+ options.color.display(color::Fg(color::Green)),
options.format_bytes(num_bytes),
+ options.color.display(color::Fg(color::Reset)),
path.as_ref().display(),
if num_errors == 0 {
Cow::Borrowed("")