From 57a177e2f946390559a1f17787c5a15d23ac3393 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Thu, 10 Sep 2020 12:39:07 +0200 Subject: Show progress bar in fill output This patch uses the progressing crate to display a progress bar for the fill command if the output is printed to a TTY. --- src/redefine.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/redefine.rs') diff --git a/src/redefine.rs b/src/redefine.rs index dad4529..10fb631 100644 --- a/src/redefine.rs +++ b/src/redefine.rs @@ -14,6 +14,12 @@ macro_rules! println { }; } +macro_rules! print { + ($ctx:expr, $($arg:tt)*) => { + write!($ctx.stdout, $($arg)*) + }; +} + macro_rules! eprintln { ($ctx:expr) => { writeln!($ctx.stderr, "") -- cgit v1.2.1