From 04a83737087049ef421a4c5c23d2b23c07a7b2d3 Mon Sep 17 00:00:00 2001 From: earnest ma Date: Wed, 25 Aug 2021 15:32:15 -0400 Subject: [PATCH] aerc: Update templates * Forwarded template * Patch applied and thanks script * Format --- .config/aerc/templates/forward_as_body | 7 +------ .config/aerc/templates/patch.sh | 2 +- .config/aerc/templates/quoted_thanks | 2 +- .config/aerc/templates/thanks | 2 +- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.config/aerc/templates/forward_as_body b/.config/aerc/templates/forward_as_body index ddb6d80..de05ab2 100644 --- a/.config/aerc/templates/forward_as_body +++ b/.config/aerc/templates/forward_as_body @@ -1,10 +1,5 @@ X-Mailer: aerc {{version}} --------- Doorgestuurd bericht -------- -Onderwerp: {{.Subject}} -Datum: {{dateFormat .OriginalDate "2006-01-02 15:04 MST" }} -Van: {{.OriginalFrom}} -Aan: {{.To}} (this is broken, remove this line) -Bericht: +Forwarded message from {{(index .OriginalFrom 0).Name}} on {{dateFormat .OriginalDate "Mon Jan 2, 2006 at 3:04 PM"}}: {{wrapText .OriginalText 72}} diff --git a/.config/aerc/templates/patch.sh b/.config/aerc/templates/patch.sh index cb10ea5..4cd0f5c 100755 --- a/.config/aerc/templates/patch.sh +++ b/.config/aerc/templates/patch.sh @@ -1,5 +1,5 @@ REMOTE_URL=$(git remote get-url --push origin) -COMMITS=$(git reflog -2 $(git for-each-ref --format='%(upstream:short)' $(git symbolic-ref -q HEAD)) --pretty=format:%h | xargs printf '%s from %s') +COMMITS=$(git reflog -2 $(git for-each-ref --format='%(upstream:short)' $(git symbolic-ref -q HEAD)) --pretty=format:%h | xargs printf '%s <- %s') CURRENT_BRANCH=$(git branch --show-current) UPSTREAM_BRANCH=$(git for-each-ref --format='%(upstream:short)' $(git symbolic-ref -q HEAD) | sed 's#^[^/]*/##g') echo "On $REMOTE_URL: diff --git a/.config/aerc/templates/quoted_thanks b/.config/aerc/templates/quoted_thanks index e3d7ae8..9a918aa 100644 --- a/.config/aerc/templates/quoted_thanks +++ b/.config/aerc/templates/quoted_thanks @@ -3,6 +3,6 @@ X-Sourcehut-Patchset-Update: APPLIED Thanks! -{{exec "~/.config/aerc/templates/patch.sh" "" }} +{{ exec "~/.config/aerc/templates/patch.sh" "" }} Op {{ dateFormat (.OriginalDate | toLocal) "2006-01-02 om 15:04 MST" }}, schreef {{ (index .OriginalFrom 0).Name }}: {{ wrapText .OriginalText 72 | quote }} diff --git a/.config/aerc/templates/thanks b/.config/aerc/templates/thanks index f63292a..1970177 100644 --- a/.config/aerc/templates/thanks +++ b/.config/aerc/templates/thanks @@ -3,4 +3,4 @@ X-Sourcehut-Patchset-Update: APPLIED Thanks! -{{exec "~/.config/aerc/templates/patch.sh" "" }} +{{ exec "~/.config/aerc/templates/patch.sh" "" }}