mblaze

Unix utilities to deal with Maildir - my mirror
git clone https://pi.duncano.de/git/mblaze.git
Log | Files | Refs | README | COPYING

commit 07d3be7a8f49f7d009138c239df6e263e96d12e4
parent d2d687478d055fa0acf2a6452cac324cc6bb54fb
Author: Christian Neukirchen <chneukirchen@gmail.com>
Date:   Mon,  8 Aug 2016 16:06:52 +0200

mcom: add delete

Diffstat:
man/mcom.1 | 2++
mcom | 11++++++++++-
2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/man/mcom.1 b/man/mcom.1 @@ -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 diff --git a/mcom b/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