aboutsummaryrefslogtreecommitdiff
path: root/mutt
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2020-05-12 22:19:52 +1200
committerTom Ryder <tom@sanctum.geek.nz>2020-05-12 22:19:52 +1200
commitb8a38ddd699a5e9605419a30f1a12e88f1cf6043 (patch)
tree46d9a4696f27ef142d6d4b7d5d5b9da48f1d9cd5 /mutt
parentUse XDG basedirs for Git config (diff)
downloaddotfiles-b8a38ddd699a5e9605419a30f1a12e88f1cf6043.tar.gz
dotfiles-b8a38ddd699a5e9605419a30f1a12e88f1cf6043.zip
Add groups generation to Mutt config
Diffstat (limited to 'mutt')
-rwxr-xr-xmutt/muttrc.d/src15
1 files changed, 14 insertions, 1 deletions
diff --git a/mutt/muttrc.d/src b/mutt/muttrc.d/src
index cc2eb4ef..d0d501bc 100755
--- a/mutt/muttrc.d/src
+++ b/mutt/muttrc.d/src
@@ -1,5 +1,18 @@
#!/bin/sh
-# Helper script to emit the source all muttrc subfiles, in LC_COLLATE order
+
+# Build groups from address lists
+for rc in "$HOME"/.muttrc.d/groups/*.rc ; do
+ [ -e "$rc" ] || continue
+ group=$rc
+ group=${group##*/}
+ group=${group%.rc}
+ while read -r member ; do
+ printf 'group -group %s -addr %s\n' \
+ "$group" "$member"
+ done < "$rc"
+done
+
+# Emit the source all muttrc subfiles, in LC_COLLATE order
for rc in "$HOME"/.muttrc.d/*.rc ; do
[ -e "$rc" ] || continue
cat -- "$rc"