about summary refs log tree commit diff
path: root/mcom
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-08-10 17:50:04 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-08-10 17:50:04 +0200
commite34e3dc9ea6a1e24960a084d2137e5e7c450e2dd (patch)
tree0aae5625ff31df57f66169ec0ce8939d90f186f4 /mcom
parentb4df49565fad59748e05bda5cd186d8cc1792ffa (diff)
downloadmblaze-e34e3dc9ea6a1e24960a084d2137e5e7c450e2dd.tar.gz
mblaze-e34e3dc9ea6a1e24960a084d2137e5e7c450e2dd.tar.xz
mblaze-e34e3dc9ea6a1e24960a084d2137e5e7c450e2dd.zip
mcom: simplify subject generation
Diffstat (limited to 'mcom')
-rwxr-xr-xmcom11
1 files changed, 1 insertions, 10 deletions
diff --git a/mcom b/mcom
index 8400de6..f720c2b 100755
--- a/mcom
+++ b/mcom
@@ -58,16 +58,7 @@ fi
 		echo "To: $to"
 		echo "Cc: $(mhdr -d -A -h to:cc: "$1" | commajoin)"
 		echo "Bcc: "
-		s=$(mhdr -d -h subject "$1")
-		os=
-		while [ "$os" != "$s" ]; do
-			os=$s
-			s=${s# }
-			s=${s#[Rr][Ee]:}
-			s=${s#[Aa][Ww]:}
-			s=${s#[Ff][Ww][Dd]:}
-		done
-		echo "Subject: Re: $s"
+		echo "Subject: Re: $(mscan -f '%S' "$1")"
 		cat ~/.mblaze/headers 2>/dev/null
 		mid=$(mhdr -h message-id "$1")
 		if [ "$mid" ]; then