From 9d0949933cb46d2e73c047b5f06201dbd75bca1d Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sat, 1 Jun 2019 15:27:17 +0530 Subject: 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. --- src/aggregate.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/aggregate.rs') 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("") -- cgit v1.2.3