diff options
author | Robin Krahl <robin.krahl@ireas.org> | 2020-09-10 12:39:07 +0200 |
---|---|---|
committer | Daniel Mueller <deso@posteo.net> | 2020-09-12 14:31:46 -0700 |
commit | 57a177e2f946390559a1f17787c5a15d23ac3393 (patch) | |
tree | a8069b927bdda75fbceb9e7a289d8338bb19fd8b /src/redefine.rs | |
parent | 33918c32b8de4250c450f8d0b007019913c440a1 (diff) | |
download | nitrocli-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.rs | 6 |
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, "") |