diff options
| author | Tomi Ollila <tomi.ollila@iki.fi> | 2016-05-07 22:24:18 +0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2016-05-19 07:49:03 -0300 |
| commit | eac29763896e457a738f811b2c2ba8f877498e62 (patch) | |
| tree | 2d023cc97efd77575943404645f04c5cf90201c7 /notmuch-reply.c | |
| parent | 2ee9351224a940eff65c6aa73ad8befab48250f9 (diff) | |
cli: tell how many messages were precisely matched when expected 1 match
In case of notmuch reply and notmuch show --part=N it is required that
search terms match to one message. If match count was != 1, error
message "Error: search term did not match precisely one message"
was too vague to explain what happened.
By appending (matched <num> messages) to the error message it
makes the problem more understandable (e.g when <num> is '0'
user reckons the query had a typo in it).
Diffstat (limited to 'notmuch-reply.c')
| -rw-r--r-- | notmuch-reply.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |
