* docs: add some examples of queries that need quoting

This commit is contained in:
djcb 2012-07-09 11:17:28 +03:00
parent b50ebeb505
commit 706a686134
4 changed files with 33 additions and 4 deletions

View File

@ -1119,6 +1119,10 @@ subject:wombat date:20090601..20090630
# get all messages with PDF attachments in the /projects folder
maildir:/projects mime:application/pdf
# get all messages about Rupert in the Sent Items folder
# note that terms with spaces need quotes
maildir:"/Sent Items" rupert
# get all important messages which are signed:
flag:signed prio:high

View File

@ -1,4 +1,4 @@
.TH MU-EASY 1 "May 2012" "User Manuals"
.TH MU-EASY 1 "July 2012" "User Manuals"
.SH NAME
@ -144,6 +144,13 @@ Get all messages from Jim without an attachment:
\fB$ mu find from:jim AND NOT flag:attach\fR
.fi
Get all messages in the Sent Items folder about yoghurt:
.nf
\fB$mu find maildir:'/Sent Items' yoghurt\fR
.fi
Note how we need to quote search terms that include spaces.
Get all unread messages where the subject mentions Ångström:
.nf
\fB$ mu find subject:Ångström flag:unread\fR

View File

@ -81,8 +81,7 @@ would do in an internet search engine. For example,
will find all messages that contain both 'monkey' and 'banana' in either body
or subject or one of the address-fields (to/from/cc).
As mentioned, matching is case-insensitive and accent-insensitive;
thus
As mentioned, matching is case-insensitive and accent-insensitive; thus
.nf
$ mu find Mönkey BÄNAÑå
@ -90,6 +89,7 @@ thus
yields the same results as the example above.
\fBmu\fR also recognizes prefixes for specific fields in a messages; for
example:
@ -243,7 +243,21 @@ could use:
$ mu find size:10K..2M
.fi
Finally, you can match \fIall\fR messages using "":
It's important to remember that if a search term includes spaces, you should
\fIquote\fr those parts. Thus, when we look at the following examples:
.nf
$ mu find maildir:/Sent Items yoghurt
$ mu find maildir:'/Sent Items' yoghurt
.fi
The first query searches for messages in the \fI/Sent\fR maildir matching
\fIItems\fR and \fIyoghurt\fR, while the second query searches the \fI/Sent
Items\fR maildir searching for messages matching \fIyoghurt\fR.
You can match \fIall\fR messages using "" (or ''):
.nf
$ mu find ""

View File

@ -38,6 +38,10 @@ If =mu= did not guess the right Maildir, you can set it explicitly:
*** signed messages about apples *OR* oranges
#+html:<pre> $ mu find flag:signed apples OR oranges</pre>
*** messages about yoghurt in the Sent Items folder (note the quoting):
#+html:<pre> $ mu find maildir:'/Sent Items' yoghurt</pre>
*** unread messages about things starting with 'soc' (soccer, society, socrates, ...)
#+html:<pre> $ mu find 'subject:soc*' flag:unread</pre>