X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-search.c;h=3076c3f637b1ef5d37b44d023a5424fb50052adb;hp=b81ac0134ef23cbcfec3d37f063a6f758cc99fdf;hb=110694b00b79793b3c09a0349c0ff7608df551d6;hpb=84d3b15d251623cbb66e5eca7ddb8d61aa596d33 diff --git a/notmuch-search.c b/notmuch-search.c index b81ac013..3076c3f6 100644 --- a/notmuch-search.c +++ b/notmuch-search.c @@ -583,6 +583,8 @@ _notmuch_search_prepare (search_context_t *ctx, notmuch_config_t *config, int ar return EXIT_FAILURE; } + notmuch_exit_if_unmatched_db_uuid (ctx->notmuch); + query_str = query_string_from_args (ctx->notmuch, argc, argv); if (query_str == NULL) { fprintf (stderr, "Out of memory.\n"); @@ -681,6 +683,7 @@ notmuch_search_command (notmuch_config_t *config, int argc, char *argv[]) { NOTMUCH_OPT_INT, &ctx->limit, "limit", 'L', 0 }, { NOTMUCH_OPT_INT, &ctx->dupe, "duplicate", 'D', 0 }, { NOTMUCH_OPT_INHERIT, (void *) &common_options, NULL, 0, 0 }, + { NOTMUCH_OPT_INHERIT, (void *) ¬much_shared_options, NULL, 0, 0 }, { 0, 0, 0, 0, 0 } }; @@ -689,6 +692,8 @@ notmuch_search_command (notmuch_config_t *config, int argc, char *argv[]) if (opt_index < 0) return EXIT_FAILURE; + notmuch_process_shared_options (argv[0]); + if (ctx->output != OUTPUT_FILES && ctx->output != OUTPUT_MESSAGES && ctx->dupe != -1) { fprintf (stderr, "Error: --duplicate=N is only supported with --output=files and --output=messages.\n"); @@ -737,6 +742,7 @@ notmuch_address_command (notmuch_config_t *config, int argc, char *argv[]) { "false", NOTMUCH_EXCLUDE_FALSE }, { 0, 0 } } }, { NOTMUCH_OPT_INHERIT, (void *) &common_options, NULL, 0, 0 }, + { NOTMUCH_OPT_INHERIT, (void *) ¬much_shared_options, NULL, 0, 0 }, { 0, 0, 0, 0, 0 } }; @@ -744,6 +750,8 @@ notmuch_address_command (notmuch_config_t *config, int argc, char *argv[]) if (opt_index < 0) return EXIT_FAILURE; + notmuch_process_shared_options (argv[0]); + if (! (ctx->output & (OUTPUT_SENDER | OUTPUT_RECIPIENTS))) ctx->output |= OUTPUT_SENDER;