X-Git-Url: https://git.madduck.net/etc/mutt.git/blobdiff_plain/616f061f77605ce342e3068e5aacda3dffa24710..8180807487f981387f6436bbada847eedcd96f36:/.mutt/edit-header diff --git a/.mutt/edit-header b/.mutt/edit-header index 3a3a96a..07817d2 100755 --- a/.mutt/edit-header +++ b/.mutt/edit-header @@ -7,7 +7,7 @@ # Copyright © 2008 martin f. krafft # Released under the terms of the Artistic Licence 2.0 # -set -euvx +set -eu if [ ! -x "$(command -v formail)" ]; then echo E: formail not installed. >&2 @@ -60,8 +60,12 @@ case "$0" in esac -echo "set my_editor=\"\$editor\'" -echo "set editor=\"$editor\"" -echo "push " -# we need to push this so it happens after the editing -echo "push :set editor=\"\$my_editor\"" +echo "set my_editor=\"\$editor\"" +echo "set my_filter=\"$editor\"" +echo -n "push '" +echo -n "set editor=\"\$my_filter\"" +echo -n "" +echo -n "set editor=\"\$my_editor\"" +echo -n "unset my_filter" +echo -n "unset my_editor" +echo "'"