azynheira / mu0

Automatically exported from code.google.com/p/mu0
0 stars 0 forks source link

mu-find does not accept complex search query as quoted string #67

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. mu find "not flag:seen"
2.
3.

What is the expected output? What do you see instead?
I would expect to see the same output as running "mu find not flag:unseen".  
Instead I get the output:

mu: no matches for search expression

What version of the product are you using? On what operating system?
commit d60fd4bb47e2ac9e824c03b9b61a5cb4af2e29d9
Ubuntu 12.04.1

Please provide any additional information below.
I am invoking mu-find in a script where the command line is automatically 
generated from a configuration file.  In order to protect the search query from 
shell escaping, I am quoting the entire string.  I would like to avoid having 
to parse the search query string entered by the user in order to pass it as 
separate tokens on the command line if at all posssible.

Original issue reported on code.google.com by michael....@gmail.com on 6 Jan 2013 at 3:57

GoogleCodeExporter commented 8 years ago
Hmm, it would be tricky to get that to work as you want, since xapian (the 
underlying database) treats the whole blob as something to match by, rather 
than a query to interpret. Of course I could break the string up in mu, but 
that breaks other queries.

So, what I'd recommend is to pass the arguments directly to mu (without shell 
interpretation).

Original comment by digg...@gmail.com on 14 Aug 2013 at 7:23