]> rtime.felk.cvut.cz Git - notmuch.git/blobdiff - notmuch.c
cli: change "setup" to "set up" where used as a verb
[notmuch.git] / notmuch.c
index 1717e8b3683c485e4652e37abc9886e13d2afa49..e5c2aeb383c23fa404e1034308435e2d0129f7ec 100644 (file)
--- a/notmuch.c
+++ b/notmuch.c
@@ -47,7 +47,7 @@ static command_t commands[] = {
     { NULL, notmuch_command, TRUE,
       "Notmuch main command." },
     { "setup", notmuch_setup_command, TRUE,
-      "Interactively setup notmuch for first use." },
+      "Interactively set up notmuch for first use." },
     { "new", notmuch_new_command, FALSE,
       "Find and import new messages to the notmuch database." },
     { "insert", notmuch_insert_command, FALSE,
@@ -314,7 +314,9 @@ main (int argc, char *argv[])
        goto DONE;
     }
 
-    if (print_help) {
+    /* Handle notmuch --help [command] and notmuch command --help. */
+    if (print_help ||
+       (opt_index + 1 < argc && strcmp (argv[opt_index + 1], "--help") == 0)) {
        /*
         * Pass the first positional argument as argv[1] so the help
         * command can give help for it. The help command ignores the