aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMoritz Poldrack <git@moritz.sh>2023-01-27 19:48:55 +0100
committerRobin Jarry <robin@jarry.cc>2023-01-29 21:54:05 +0100
commit17ce7c762cb10ce4272de8ddd45367ba94360456 (patch)
tree586a22def17636d4db31a185de6a25e08bc370c7 /doc
parent549eab7f2ce96d8b1c80b922515b3ae3c3914fc8 (diff)
downloadaerc-17ce7c762cb10ce4272de8ddd45367ba94360456.tar.gz
templates: add trimSignature function
Some contacts, especially corporate, include a wall of text in their signatures. To not clutter the reply chain, this commit introduces a new function to the templating engine that removes the signature from a message. Link: https://learn.microsoft.com/en-us/microsoft-365/admin/setup/create-signatures-and-disclaimers Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'doc')
-rw-r--r--doc/aerc-templates.7.scd10
1 files changed, 9 insertions, 1 deletions
diff --git a/doc/aerc-templates.7.scd b/doc/aerc-templates.7.scd
index 87713429..bfba05c4 100644
--- a/doc/aerc-templates.7.scd
+++ b/doc/aerc-templates.7.scd
@@ -172,6 +172,14 @@ aerc provides the following additional functions:
{{quote .OriginalText}}
```
+*trimSignature*
+ Removes the signature froma passed in mail. Quoted signatures are kept
+ as they are.
+
+ ```
+ {{trimSignature .OriginalText}}
+ ```
+
*join*
Join the provided list of strings with a separator:
@@ -274,7 +282,7 @@ aerc provides the following additional functions:
{{if eq .OriginalMIMEType "text/html"}}
{{exec `/usr/libexec/aerc/filters/html` .OriginalText | wrap 72 | quote}}
{{else}}
- {{wrap 72 .OriginalText | quote}}
+ {{wrap 72 .OriginalText | trimSignature | quote}}
{{end}}
```