]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-new.c
cli: define shared options, use for --help and --version
[notmuch] / notmuch-new.c
index 5ac7eedff70bfff763bbe29e39a3f369f7537650..8ff1ade70e49565b0c456272e51133e2e7c9bf17 100644 (file)
@@ -934,6 +934,7 @@ notmuch_new_command (notmuch_config_t *config, int argc, char *argv[])
        { NOTMUCH_OPT_BOOLEAN,  &verbose, "verbose", 'v', 0 },
        { NOTMUCH_OPT_BOOLEAN,  &add_files_state.debug, "debug", 'd', 0 },
        { NOTMUCH_OPT_BOOLEAN,  &no_hooks, "no-hooks", 'n', 0 },
+       { NOTMUCH_OPT_INHERIT, (void *) &notmuch_shared_options, NULL, 0, 0 },
        { 0, 0, 0, 0, 0 }
     };
 
@@ -941,6 +942,8 @@ notmuch_new_command (notmuch_config_t *config, int argc, char *argv[])
     if (opt_index < 0)
        return EXIT_FAILURE;
 
+    notmuch_process_shared_options (argv[0]);
+
     /* quiet trumps verbose */
     if (quiet)
        add_files_state.verbosity = VERBOSITY_QUIET;