aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch.c
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2010-04-02 11:55:09 -0700
committerGravatar Carl Worth <cworth@cworth.org>2010-04-02 11:55:09 -0700
commitb2a9fcd5cfd1bf84321b8bf53b37e7fb98618d6e (patch)
treef1df126e2e7283bcb28647be0cfaa26c48129f28 /notmuch.c
parent9d9aeb7c71a52b67519f567c34acc3cf3bec6fd2 (diff)
notmuch: Add a version (0.1 initially) with a new --version option.
We're planning to do actual releases soon, so we need a version number to put into the tar file.
Diffstat (limited to 'notmuch.c')
-rw-r--r--notmuch.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/notmuch.c b/notmuch.c
index 3b743a90..e519f98e 100644
--- a/notmuch.c
+++ b/notmuch.c
@@ -309,6 +309,7 @@ usage (FILE *out)
fprintf (out,
"Usage: notmuch --help\n"
+ " notmuch --version\n"
" notmuch <command> [args...]\n");
fprintf (out, "\n");
fprintf (out, "Where <command> and [args...] are as follows:\n");
@@ -462,6 +463,11 @@ main (int argc, char *argv[])
if (STRNCMP_LITERAL (argv[1], "--help") == 0)
return notmuch_help_command (NULL, 0, NULL);
+ if (STRNCMP_LITERAL (argv[1], "--version") == 0) {
+ printf ("notmuch version " STRINGIFY(NOTMUCH_VERSION) "\n");
+ return 0;
+ }
+
for (i = 0; i < ARRAY_SIZE (commands); i++) {
command = &commands[i];