X-Git-Url: https://git.madduck.net/etc/mutt.git/blobdiff_plain/9697fb1471e041b28c583426c7e113e2ea621fa9..7013dfe93a05082153f79eca6c9e5c05b54d9d50:/.mutt/batch-subject-editor diff --git a/.mutt/batch-subject-editor b/.mutt/batch-subject-editor deleted file mode 100755 index e5bb596..0000000 --- a/.mutt/batch-subject-editor +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# -# batch-subject-editor - helper script to change subject lines with mutt -# -# Based on an idea by David Champion -# -# Copyright © 2008 martin f. krafft -# Released under the terms of the Artistic Licence 2.0 -# -set -eu - -if [ -z "${__RLWRAPPED:-}" ] && [ -x $(command -v rlwrap) ]; then - __RLWRAPPED=true exec rlwrap "$0" "$@" -fi - -printf 'Enter new subject: ' >/dev/tty -read subj &2 - exit 1 -fi - -RE_REPLY='((re|aw|antwort)([[(]?[[:digit:]]+[)]]?)?):[[:space:]]*' -RE_SUBJ_PREFIX="^Subject:[[:space:]]*(${RE_REPLY})*" -RE_SUBJ='.*' -EDITOR="sed -i -re \"s,(${RE_SUBJ_PREFIX})${RE_SUBJ},\\\1$subj,i\"" - -printf "set editor='${EDITOR} %s'"