aboutsummaryrefslogtreecommitdiffstats
path: root/doc/aerc-templates.7.scd
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-02-12 01:36:37 +0100
committerRobin Jarry <robin@jarry.cc>2023-02-20 14:48:38 +0100
commit24f91b0277a1034f731aaf00c3e1f894c5ad27c1 (patch)
treedf48abbc43c8d19f07151b1d02891f23f7fe1864 /doc/aerc-templates.7.scd
parent87e3d4bafa9f1b8e91172c135644783de548e35b (diff)
downloadaerc-24f91b0277a1034f731aaf00c3e1f894c5ad27c1.tar.gz
templates: add firstnames and shortmboxes functions
These can be handy for tab-title-composer. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
Diffstat (limited to 'doc/aerc-templates.7.scd')
-rw-r--r--doc/aerc-templates.7.scd21
1 files changed, 20 insertions, 1 deletions
diff --git a/doc/aerc-templates.7.scd b/doc/aerc-templates.7.scd
index 5f208067..c7bb0d1f 100644
--- a/doc/aerc-templates.7.scd
+++ b/doc/aerc-templates.7.scd
@@ -198,13 +198,23 @@ aerc provides the following additional functions:
*names*
Extracts the names part from a mail.Address list. If there is no name
- available, the email address is returned instead.
+ available, the mbox (email address without @domain) is returned instead.
```
{{.To | names | join ", "}}
{{index (.To | names) 0}}
```
+*firstnames*
+ Extracts the first names part from a mail.Address list. If there is no
+ name available, the short mbox (start of email address without @domain)
+ is returned instead.
+
+ ```
+ {{.To | firstnames | join ", "}}
+ {{index (.To | firstnames) 0}}
+ ```
+
*initials*
Extracts the initials from the names part from a mail.Address list. If
there is no name available, the first letter of the email address is
@@ -232,6 +242,15 @@ aerc provides the following additional functions:
{{index (.To | mboxes) 0}}
```
+*shortmboxes*
+ Extracts the short mbox part from a mail.Address list (i.e. _smith_ from
+ _smith.and.wesson@example.com_).
+
+ ```
+ {{.To | shortmboxes | join ", "}}
+ {{index (.To | shortmboxes) 0}}
+ ```
+
*persons*
Formats a list of mail.Address into a list of strings containing the
human readable form of RFC5322 (e.g. _Firstname Lastname