about summary refs log tree commit diff
path: root/mcom
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-08-08 16:06:52 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-08-08 16:06:52 +0200
commit07d3be7a8f49f7d009138c239df6e263e96d12e4 (patch)
tree31ecc6db8db12d2b2ff408bfd3b5023cbb370d18 /mcom
parentd2d687478d055fa0acf2a6452cac324cc6bb54fb (diff)
downloadmblaze-07d3be7a8f49f7d009138c239df6e263e96d12e4.tar.gz
mblaze-07d3be7a8f49f7d009138c239df6e263e96d12e4.tar.xz
mblaze-07d3be7a8f49f7d009138c239df6e263e96d12e4.zip
mcom: add delete
Diffstat (limited to 'mcom')
-rwxr-xr-xmcom11
1 files changed, 10 insertions, 1 deletions
diff --git a/mcom b/mcom
index 72269a8..0402b20 100755
--- 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