aboutsummaryrefslogtreecommitdiff
path: root/doc/aerc-templates.7.scd
diff options
context:
space:
mode:
Diffstat (limited to 'doc/aerc-templates.7.scd')
-rw-r--r--doc/aerc-templates.7.scd8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/aerc-templates.7.scd b/doc/aerc-templates.7.scd
index 7d77cd0b..401c04e7 100644
--- a/doc/aerc-templates.7.scd
+++ b/doc/aerc-templates.7.scd
@@ -384,6 +384,14 @@ aerc provides the following additional functions:
X-Mailer: aerc {{version}}
```
+*match*
+ Check if a string matches a regular expression. This is intended for
+ use in conditional control flow:
+
+ ```
+ {{if match .Subject `^(\[[\w-]+\]\s*)?\[(RFC )?PATCH`}}{{.Style .Subject "cyan"}}{{else}}{{.Subject}}{{end}}
+ ```
+
*Function chaining*
All of the template functions can be chained together if needed.