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>2021-01-10 21:05:44 -0800
commite085dcda752f7a5007e35c2baecbf094d888faa0 (patch)
tree45a1000cd8f69d6f02dae64bc1f17d48b4a84176 /src/redefine.rs
parent763219bc4331331351b4180d4775432e9e11f8b2 (diff)
downloadnitrocli-e085dcda752f7a5007e35c2baecbf094d888faa0.tar.gz
nitrocli-e085dcda752f7a5007e35c2baecbf094d888faa0.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, "")