Skip to content

Conditions

Conditions are optional filters attached to a rule. When present, they must all be satisfied for the rule's actions to run. If a rule has no conditions, it matches every file that triggers it.

Available Conditions

ConditionChecks
File NameThe file name, including its extension
File PathThe full vault-relative path of the file
PropertyA frontmatter property value

String Operators

All condition types share the same set of operators:

OperatorDescription
existsTrue if the value is non-empty. No comparison input needed.
containsTrue if the value includes the given string
starts withTrue if the value begins with the given string
ends withTrue if the value ends with the given string
matches regexTrue if the value matches the given regular expression

Operators are case-sensitive. For case-insensitive matching, use matches regex with the (?i) flag — for example, (?i)meeting matches Meeting, MEETING, and meeting.

Invalid regex: If a condition contains a malformed regular expression, evaluation throws an error and the rule stops processing that file.

Condition Groups

Conditions are organised into a root group that determines how they are combined:

Group typeBehaviour
AllEvery condition in the group must be true (logical AND)
AnyAt least one condition must be true (logical OR)
NoneNo condition in the group must be true (logical NOT/NOR)

If a group itself contains no conditions, it evaluates to true and has no effect on the rule.

Released under the MIT License.