Currently when you specify --query on the command line, the results of that query will be union'ed with the results in the finder (or the results that were loaded from a preset).
However, sometimes we want to take the intersection of the initial set of tasks + the tasks matched by --query. This is especially useful when using presets, e.g:
$ ./mach try --preset perf -q "windows"
This command line would select all perf tasks + all windows tasks (as opposed to all windows perf tasks). The latter is likely what developers will want more often than not, but it is not currently possible.
There are a few options here:
A) A try syntax-like --and argument that changes queries to intersection:
$ ./mach try --preset perf --and -q "windows"
B) A separate cli argument:
$ ./mach try --preset perf --xquery "windows"
C) A modifier within the query itself:
$ ./mach try --preset perf -q "x:windows"
After some discussion on irc, I think option A will be the least confusing as it is consistent with try syntax and doesn't allow complex invocations that have both unions and intersections in them.
I plan on making the cli -x/--and so that we can also use something like:
$ ./mach try --preset perf -xq "windows"