aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch-client.h
diff options
context:
space:
mode:
authorGravatar Adrian Perez <aperez@igalia.com>2009-11-21 01:17:18 +0100
committerGravatar Carl Worth <cworth@cworth.org>2009-11-23 01:07:02 +0100
commit5fdce046a189f6232c1bd2f89a6df04e02b226f0 (patch)
tree7a427d35ed0c643aed95e41dfbb325fced9dd647 /notmuch-client.h
parentec738509f291fb6563013cc530d7930cfe6495fb (diff)
Support for printing file paths in new command
For very large mail boxes, it is desirable to know which files are being processed e.g. when a crash occurs to know which one was the cause. Also, it may be interesting to have a better idea of how the operation is progressing when processing mailboxes with big messages. This patch adds support for printing messages as they are processed by "notmuch new": * The "new" command now supports a "--verbose" flag. * When running in verbose mode, the file path of the message about to be processed is printed in the following format: current/total: /path/to/message/file Where "current" is the number of messages processed so far and "total" is the total count of files to be processed. The status line is erased using an ANSI sequence "\033[K" (erase current line from the cursor to the end of line) each time it is refreshed. This should not pose a problem because nearly every terminal supports it. * The signal handler for SIGALRM and the timer are not enabled when running in verbose mode, because we are already printing progress with each file, periodical reports are not neccessary.
Diffstat (limited to 'notmuch-client.h')
-rw-r--r--notmuch-client.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/notmuch-client.h b/notmuch-client.h
index ea776860..f105c8b2 100644
--- a/notmuch-client.h
+++ b/notmuch-client.h
@@ -74,6 +74,7 @@ typedef void (*add_files_callback_t) (notmuch_message_t *message);
typedef struct {
int ignore_read_only_directories;
int saw_read_only_directory;
+ int verbose;
int total_files;
int processed_files;