mutt-wizard

fork of Luke Smiths mutt-wizard
git clone git://git.jakekoroman.com/mutt-wizard
Log | Files | Refs | README | LICENSE

commit effa100e044de157d1db30978b8fab101e627df8
parent 7955090f9f5ffc8e95070924a56f492ec6bbd0d7
Author: luukvbaal <31730729+luukvbaal@users.noreply.github.com>
Date:   Sat,  1 Jun 2019 21:56:55 +0200

fix multiline subject header regression
Diffstat:
Mbin/mailsync | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/mailsync b/bin/mailsync @@ -30,7 +30,7 @@ syncandnotify() { for file in $new; do # Extract subject and sender from mail. from=$(awk '/^From: / && ++n ==1,/^\<.*\>:/' "$file" | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' | awk '{ $1=""; if (NF>=3)$NF=""; print $0 }' | sed 's/^[[:blank:]]*[\"'\''\<]*//;s/[\"'\''\>]*[[:blank:]]*$//') - subject=$(awk '/^Subject: / && ++n == 1,/^\<.*\>: /' "$file" | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' | sed 's/^Subject: //' | sed 's/^{[[:blank:]]*[\"'\''\<]*//;s/[\"'\''\>]*[[:blank:]]*$//') + subject=$(awk '/^Subject: / && ++n == 1,/^\<.*\>: / && ++i == 2' "$file" | head -n-1 | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' | sed 's/^Subject: //' | sed 's/^{[[:blank:]]*[\"'\''\<]*//;s/[\"'\''\>]*[[:blank:]]*$//' | tr -d '\n') notify-send "📧$from:" "$subject" & done fi