After a question about how to match tiddlers that have two tags and no others I realised once again that we don't have a complete set of logic operations available to us when using tiddlywiki filters. We don't have the ability to directly test a list field in a tiddler against another list. Tobias made a plugin a while ago that address this problem
but it used some non-tiddlywiki syntax and it overloaded one operator with three separate operations.
Since nothing has been done with this in a while I decided to make three filter operators to fill the gap:
contains, match and overlap
You can see the documentation for them along with examples
here.
They work a lot like the listed operator, but with the input and operand switched. I feel that this is much more consistent with how other filter operators work, although both ways have times when they are useful.
The contains operator returns a tiddler if the field given by the suffix of the operator (list by default) contains all of the items listed in the operand. It may contain more than listed in the operand.
The match operator returns a tiddler title if the field contains exactly the same items as the list in the operand, but they don't necessarily have to be in the same order.
The overlap operator returns a tiddler title if there is at least one item that is in both the field in the input tiddler and the operand list.
There are places where each of these can do the same thing as existing filters, but all of them also have unique purposes. I wanted to get some feedback here before I make a pull request.
I would really like to get a better name than 'overlap' for the third operator.