diff --git a/notmuch-reply.c b/notmuch-reply.c index 3c6d685c..a74194a3 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -664,7 +664,7 @@ notmuch_reply_format_sprinter(void *ctx, return 1; if (count != 1) { - fprintf (stderr, "Error: search term did not match precisely one message.\n"); + fprintf (stderr, "Error: search term did not match precisely one message (matched %d messages).\n", count); return 1; } diff --git a/notmuch-show.c b/notmuch-show.c index 87e52bbc..3d5033d6 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -904,7 +904,7 @@ do_show_single (void *ctx, return 1; if (count != 1) { - fprintf (stderr, "Error: search term did not match precisely one message.\n"); + fprintf (stderr, "Error: search term did not match precisely one message (matched %d messages).\n", count); return 1; } diff --git a/test/T210-raw.sh b/test/T210-raw.sh index dfea2d19..832a4ad3 100755 --- a/test/T210-raw.sh +++ b/test/T210-raw.sh @@ -8,7 +8,7 @@ add_message test_begin_subtest "Attempt to show multiple raw messages" output=$(notmuch show --format=raw "*" 2>&1) -test_expect_equal "$output" "Error: search term did not match precisely one message." +test_expect_equal "$output" "Error: search term did not match precisely one message (matched 2 messages)." test_begin_subtest "Show a raw message" output=$(notmuch show --format=raw id:msg-001@notmuch-test-suite | notmuch_date_sanitize)