projects
/
muttjump
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
220e729
)
use formail if available (works for multiline Message-ID headers)
author
Johannes Weißl
<jargon@molb.org>
Wed, 10 Nov 2010 12:12:17 +0000
(13:12 +0100)
committer
Johannes Weißl
<jargon@molb.org>
Wed, 10 Nov 2010 12:12:17 +0000
(13:12 +0100)
muttjump
patch
|
blob
|
history
diff --git
a/muttjump
b/muttjump
index 0a45d1da18de72b3ffa688bd19a4ae5c4d434a70..1f1632167cf18a1163cc2de6609fcbb092ddd939 100755
(executable)
--- a/
muttjump
+++ b/
muttjump
@@
-46,6
+46,7
@@
MAIRIX=${MAIRIX:-mairix}
MU=${MU:-mu}
NMZMAIL=${NMZMAIL:-nmzmail}
SCREEN=${SCREEN:-screen}
MU=${MU:-mu}
NMZMAIL=${NMZMAIL:-nmzmail}
SCREEN=${SCREEN:-screen}
+FORMAIL=${FORMAIL:-formail}
function die () {
echo -e >&2 "$0: $1"
function die () {
echo -e >&2 "$0: $1"
@@
-70,7
+71,11
@@
if ! type -p $MUTT >/dev/null ; then
fi
# search for Message-ID in STDIN
fi
# search for Message-ID in STDIN
-msgid=$(sed -n 's/^Message-ID: \(.*\)/\1/Ip' | head -n1)
+if type -p $FORMAIL >/dev/null ; then
+ msgid=$(formail -c -z -x Message-ID | head -n1)
+else
+ msgid=$(sed -n 's/^Message-ID: \(.*\)/\1/Ip' | head -n1)
+fi
if [ -z "$msgid" ] ; then
die "could not find Message-ID header in standard input"
fi
if [ -z "$msgid" ] ; then
die "could not find Message-ID header in standard input"
fi
Benjamin Mako Hill
||
Want to submit a patch?