mrep: add -noquote

Closes #139.
pull/153/head
Leah Neukirchen 5 years ago
parent 5280abfa10
commit ae720c51e0

@ -14,6 +14,7 @@
.Nm mcom .Nm mcom
.Fl r Op draft .Fl r Op draft
.Nm mrep .Nm mrep
.Op Fl noquote
.Op Fl Ar header Ar values\ ... Fl - .Op Fl Ar header Ar values\ ... Fl -
.Ar msg .Ar msg
.Nm mfwd .Nm mfwd
@ -36,6 +37,9 @@ by default, the last modified draft will be edited.
.Nm mrep .Nm mrep
creates the draft such that the message will be a reply to creates the draft such that the message will be a reply to
.Ar msg . .Ar msg .
Unless
.Fl noquote
is passed, it will contain the original mail quoted.
.Pp .Pp
.Nm mfwd .Nm mfwd
creates the draft with a subject and body appropriate creates the draft with a subject and body appropriate

10
mcom

@ -76,6 +76,7 @@ default_from=$(mhdr -h local-mailbox "$MBLAZE/profile")
hdrs= hdrs=
resume= resume=
noquote=
case "$0" in case "$0" in
*mcom*) *mcom*)
hdr=to hdr=to
@ -160,6 +161,9 @@ case "$0" in
--) --)
shift shift
break;; break;;
-noquote)
noquote=1
shift;;
-??*) -??*)
hdr=${1#-} hdr=${1#-}
shift;; shift;;
@ -308,8 +312,10 @@ fi
cat "$MBLAZE/headers" 2>/dev/null cat "$MBLAZE/headers" 2>/dev/null
printf '\n' printf '\n'
mquote "$1" if [ -z "$noquote" ]; then
printf '\n' mquote "$1"
printf '\n'
fi
( (
IFS=$NL IFS=$NL
cat -- /dev/null $(printf '%s' "$hdrs" | mhdr -M -h body /dev/stdin) cat -- /dev/null $(printf '%s' "$hdrs" | mhdr -M -h body /dev/stdin)

Loading…
Cancel
Save