X-Git-Url: https://git.madduck.net/etc/mutt.git/blobdiff_plain/9a6cfd7f07585a98179ae7e272677d9b75e2c581..f1ab8bcb3d0102fe44d2baad1de229f3edce4048:/.mutt/reuse-message?ds=inline diff --git a/.mutt/reuse-message b/.mutt/reuse-message index 6353558..0d8ed23 100755 --- a/.mutt/reuse-message +++ b/.mutt/reuse-message @@ -11,7 +11,7 @@ for i in "$@"; do esac done -tmpfile=$(tempfile -p reuse) +tmpfile=$(mktemp --tmpdir reuse.XXXXXXXXXX) cleanup() { rm -f "$tmpfile"; trap - 1 2 3 4 5 6 7 8 10 11 12 13 14 15; } trap cleanup 1 2 3 4 5 6 7 8 10 11 12 13 14 15 @@ -21,6 +21,8 @@ formail -I Subject: < "$mailfile" | \ sed -e '/^Bcc:/aSubject: ' > "$tmpfile" cat "$tmpfile" > "$mailfile" +cleanup + if [ -n "$editor" ]; then eval exec "$editor" "$mailfile"