From: Adrian Perez Date: Sat, 21 Nov 2009 00:17:18 +0000 (+0100) Subject: Support for printing file paths in new command X-Git-Tag: 0.1~362 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=5fdce046a189f6232c1bd2f89a6df04e02b226f0;hp=5fdce046a189f6232c1bd2f89a6df04e02b226f0 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. ---