]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-search.c
CLI: move query syntax to shared option
[notmuch] / notmuch-search.c
index 39d55bfeb25e33add37d2d017f36551d5ec2f842..327e144564de48e0b339036528505d5a227bc40a 100644 (file)
@@ -722,7 +722,8 @@ _notmuch_search_prepare (search_context_t *ctx, int argc, char *argv[])
 
     if (print_status_database ("notmuch search", ctx->notmuch,
                               notmuch_query_create_with_syntax (ctx->notmuch, query_str,
-                                                                ctx->query_syntax, &ctx->query)))
+                                                                shared_option_query_syntax (),
+                                                                &ctx->query)))
        return EXIT_FAILURE;
 
     notmuch_query_set_sort (ctx->query, ctx->sort);
@@ -788,10 +789,6 @@ static const notmuch_opt_desc_t common_options[] = {
                                  { "text", NOTMUCH_FORMAT_TEXT },
                                  { "text0", NOTMUCH_FORMAT_TEXT0 },
                                  { 0, 0 } } },
-    { .opt_keyword = &search_context.query_syntax, .name = "query", .keywords =
-         (notmuch_keyword_t []){ { "infix", NOTMUCH_QUERY_SYNTAX_XAPIAN },
-                                 { "sexp", NOTMUCH_QUERY_SYNTAX_SEXP },
-                                 { 0, 0 } } },
     { .opt_int = &notmuch_format_version, .name = "format-version" },
     { }
 };