On Mon, Oct 05, 2026 at 10:49:50AM +0300, Eetu Eloranta via isync-devel wrote:
I have written some notmuch hooks for my personal use, and wound up
wanting to see the pretty progress output from mbsync through a pipe,
but it turns out that it wasn't possible without resorting to somehow
tricking isatty(1).
yeah, i was wondering when somebody would ask for that ...
On Mon, Oct 05, 2026 at 10:49:51AM +0300, Eetu Eloranta via isync-devel
wrote:
+++ b/src/common.h
@@ -143,6 +143,12 @@ enum {
+enum {
+ PROGRESS_AUTO,
+ PROGRESS_ALWAYS,
+ PROGRESS_NEVER,
+};
+
i probably wouldn't bother with declaring an enum for that, because ...
@@ -175,6 +181,7 @@ DEFINE_BIT_ENUM(options_enum)
// Global options
+extern int ProgressMode;
.. actual use never leaves main(). so make it local, and just use -1,
0, 1 for auto, no, yes, resp.
+++ b/src/main.c
@@ -48,6 +48,7 @@ PACKAGE " " VERSION " - mailbox synchronizer\n"
+" -p, --progress MODE select progress mode (see manual, default: auto)\n"
this seems over-engineered, and doesn't fit the existing patterns very
well. i'd go with "-pn, --no-progress" and "-p, --progress". the auto
mode doesn't need an explicit option.
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel