]> git.notmuchmail.org Git - notmuch/blobdiff - lib/parse-sexp.cc
lib/sexp: allow * as alias for "" in range searches.
[notmuch] / lib / parse-sexp.cc
index 6282a4560983e40492d5b5625096a9b336df1feb..6814c9fc28009558d2f5603f91c6a747fc699c8f 100644 (file)
@@ -473,6 +473,9 @@ _sexp_parse_range (notmuch_database_t *notmuch,  const _sexp_prefix_t *prefix,
     }
 
     from = sx->val;
+    if (strcmp (from, "*") == 0)
+       from = "";
+
     to = from;
 
     if (sx->next) {
@@ -488,6 +491,8 @@ _sexp_parse_range (notmuch_database_t *notmuch,  const _sexp_prefix_t *prefix,
        }
 
        to = sx->next->val;
+       if (strcmp (to, "*") == 0)
+           to = "";
     }
 
     if (strcmp (prefix->name, "date") == 0) {