X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-search.c;h=380e9d8fbd8f6dffc582cdd0e8788f7dc11b3913;hp=019e14eea846d6a68fe36a0210318bcd35d84063;hb=43668950626f347f05aad7d49cd9ea4383030443;hpb=0aba694c11846f76cfa64470d10a50cec8e43bd5 diff --git a/notmuch-search.c b/notmuch-search.c index 019e14ee..380e9d8f 100644 --- a/notmuch-search.c +++ b/notmuch-search.c @@ -160,6 +160,7 @@ do_search_threads (search_context_t *ctx) const char *subject = notmuch_thread_get_subject (thread); const char *thread_id = notmuch_thread_get_thread_id (thread); int matched = notmuch_thread_get_matched_messages (thread); + int files = notmuch_thread_get_total_files (thread); int total = notmuch_thread_get_total_messages (thread); const char *relative_date = NULL; notmuch_bool_t first_tag = TRUE; @@ -175,13 +176,23 @@ do_search_threads (search_context_t *ctx) if (format->is_text_printer) { /* Special case for the text formatter */ - printf ("thread:%s %12s [%d/%d] %s; %s (", + printf ("thread:%s %12s ", thread_id, - relative_date, + relative_date); + if (total == files) + printf ("[%d/%d] %s; %s (", matched, total, sanitize_string (ctx_quote, authors), sanitize_string (ctx_quote, subject)); + else + printf ("[%d/%d(%d)] %s; %s (", + matched, + total, + files, + sanitize_string (ctx_quote, authors), + sanitize_string (ctx_quote, subject)); + } else { /* Structured Output */ format->map_key (format, "thread"); format->string (format, thread_id);