From: Johannes Weißl Date: Mon, 6 Dec 2010 06:38:14 +0000 (+0100) Subject: slightly better mairix quoting (2) X-Git-Url: https://projects.mako.cc/source/muttjump/commitdiff_plain/7ee3d9bac7902c2dd763dc7acf1a1113c2f2f0d6 slightly better mairix quoting (2) --- diff --git a/muttjump b/muttjump index a950edb..38e8a02 100755 --- a/muttjump +++ b/muttjump @@ -153,9 +153,9 @@ case $MUTTJUMP_INDEXER in # mairix can't quote special characters (~,/=^) in search words. As a # workaround, split Message-ID in 31-character long AND-linked # substrings. - msgid_mairix=$(echo "$msgid_clean" | sed -e 's/.\{31\}/&=,/g' \ - -e 's/[~,/=^]\+/=,/g' -e 's/\(=,\)\+/=,/g' \ - -e 's/^\(=,\)\+//g' -e 's/$/=/' -e 's/\(=,\|=\)\+$/=/g') + msgid_mairix=$(echo "$msgid_clean" | sed -e 's/[~,/=^]\+/ /g' \ + -e 's/[^ ]\{31\}/& /g' -e 's/^ \+//g' -e 's/ \+$/=/g' \ + -e 's/ /=,/g') orig_msgfiles=$($MAIRIX -r "m:$msgid_mairix") ;; mu)