aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch.c
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2009-10-23 15:57:39 -0700
committerGravatar Carl Worth <cworth@cworth.org>2009-10-23 15:57:39 -0700
commit6cccc10bf0207a6567332d83167fc73f38cc5e0d (patch)
treeb3e152057fa942870b6a8af14201843d3c55695b /notmuch.c
parentcbb2675ec5b52c76cd17b2cb3feb87d88aa134a7 (diff)
More care in final status reporting.
Printing "Added 1 new messages" just looks like lack of attention to detail, (but yes plurals can be annoying this way).
Diffstat (limited to 'notmuch.c')
-rw-r--r--notmuch.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/notmuch.c b/notmuch.c
index d4e07453..581cc4c0 100644
--- a/notmuch.c
+++ b/notmuch.c
@@ -447,8 +447,12 @@ setup_command (int argc, char *argv[])
} else {
printf (". \n");
}
- printf ("Added %d unique messages to the database.\n\n",
- add_files_state.added_messages);
+ if (add_files_state.added_messages) {
+ printf ("Added %d %s to the database.\n\n",
+ add_files_state.added_messages,
+ add_files_state.added_messages == 1 ?
+ "message" : "unique messages");
+ }
printf ("When new mail is delivered to %s in the future,\n"
"run \"notmuch new\" to add it to the database.\n",
@@ -507,8 +511,10 @@ new_command (int argc, char *argv[])
}
}
if (add_files_state.added_messages) {
- printf ("Added %d new messages to the database (not much, really).\n",
- add_files_state.added_messages);
+ printf ("Added %d new %s to the database (not much, really).\n",
+ add_files_state.added_messages,
+ add_files_state.added_messages == 1 ?
+ "message" : "messages");
} else {
printf ("No new mail---and that's not much!\n");
}