aboutsummaryrefslogtreecommitdiff
path: root/src/redefine.rs
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2020-09-10 12:39:07 +0200
committerDaniel Mueller <deso@posteo.net>2020-09-12 14:31:46 -0700
commit57a177e2f946390559a1f17787c5a15d23ac3393 (patch)
treea8069b927bdda75fbceb9e7a289d8338bb19fd8b /src/redefine.rs
parent33918c32b8de4250c450f8d0b007019913c440a1 (diff)
downloadnitrocli-57a177e2f946390559a1f17787c5a15d23ac3393.tar.gz
nitrocli-57a177e2f946390559a1f17787c5a15d23ac3393.tar.bz2
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.
Diffstat (limited to 'src/redefine.rs')
-rw-r--r--src/redefine.rs6
1 files changed, 6 insertions, 0 deletions
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, "")