mcom: add delete

pull/2/head
Christian Neukirchen 8 years ago
parent d2d687478d
commit 07d3be7a8f

@ -40,6 +40,8 @@ on the draft, and show the result of
.Ic mshow -t .
.It Ic e
Re-run the editor on the draft.
.It Ic d
Delete the draft and quit.
.El
.Sh ENVIRONMENT
.Bl -tag -width Ds

11
mcom

@ -159,8 +159,17 @@ while :; do
c=c
fi
;;
d|delete)
rm -i $draft
if ! [ -f $draft ]; then
rm -f $draftmime
echo "mcom: deleted draft $draft"
exit 0
fi
c=
;;
*)
echo -n "What now? ([s]end, [c]ancel, [e]dit, [m]ime) "
echo -n "What now? ([s]end, [c]ancel, [d]elete, [e]dit, [m]ime) "
read -r c
;;
esac

Loading…
Cancel
Save