aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2018-04-07 19:10:51 -0300
committerDavid Bremner <david@tethera.net>2018-04-24 23:08:10 -0300
commit20ba0b7dfae2111f76d71c8d695265014c2ef7c5 (patch)
tree00eb0bfb207929ea8c9879555801db304fc74a19 /doc
parente8ac065a502996efd3aed0d140d4131684a3f2cb (diff)
doc: add a section on quoting to notmuch-search-terms(7)
I think we've diverged enough from the Xapian query parser that we can't rely on that syntax description [1]. As far as I can tell, [1] also only discusses quotes in the context of phrases. [1]: https://xapian.org/docs/queryparser.html
Diffstat (limited to 'doc')
-rw-r--r--doc/man7/notmuch-search-terms.rst24
1 files changed, 23 insertions, 1 deletions
diff --git a/doc/man7/notmuch-search-terms.rst b/doc/man7/notmuch-search-terms.rst
index b4d784a3..248444e3 100644
--- a/doc/man7/notmuch-search-terms.rst
+++ b/doc/man7/notmuch-search-terms.rst
@@ -42,7 +42,7 @@ of the prefixes with <regex> forms can be also used to restrict the
results to those whose value matches a regular expression (see
**regex(7)**) delimited with //, for example::
- notmuch search 'from:/bob@.*[.]example[.]com/'
+ notmuch search 'from:"/bob@.*[.]example[.]com/"'
from:<name-or-address> or from:/<regex>/
The **from:** prefix is used to match the name or address of
@@ -273,6 +273,28 @@ Both of these will match a subject "Free Delicious Pizza" while
will not.
+Quoting
+-------
+
+Double quotes are also used by the notmuch query parser to protect
+boolean terms or regular expressions containing spaces or other
+special characters, e.g.
+
+::
+
+ tag:"a tag"
+
+::
+
+ folder:"/^.*/(Junk|Spam)$/"
+
+As with phrases, you need to protect the double quotes from the shell
+e.g.
+
+::
+
+ % notmuch search 'folder:"/^.*/(Junk|Spam)$/"'
+
DATE AND TIME SEARCH
====================