]> projects.mako.cc - muttjump/commitdiff
quote namazu search term
authorJohannes Weißl <jargon@molb.org>
Sun, 5 Dec 2010 03:30:22 +0000 (04:30 +0100)
committerJohannes Weißl <jargon@molb.org>
Sun, 5 Dec 2010 03:30:22 +0000 (04:30 +0100)
muttjump

index 53a44bbe63e9bab6054c6976f2a10228eb134db1..fb9bde09f22d96c0bbc60f7ac39b249a6eeaec75 100755 (executable)
--- a/muttjump
+++ b/muttjump
@@ -63,6 +63,10 @@ function quote () {
     echo \'${1//\'/\'\\\'\'}\'
 }
 
+function quote_regexp () {
+    echo "$1" | sed 's/[][\^.$|)(*+?}{]/\\&/g'
+}
+
 function is_callable () {
     type $1 >/dev/null 2>&1
 }
@@ -158,7 +162,7 @@ case $MUTTJUMP_INDEXER in
         ;;
     nmzmail)
         nmzmail_results=$(mktemp -d)
-        echo "+message-id:$msgid" | $NMZMAIL -r "$nmzmail_results"
+        echo "+message-id:/^$msgid_quoted$/" | $NMZMAIL -r "$nmzmail_results"
         orig_msgfiles=$(find "$nmzmail_results" -type l -exec readlink {} \;)
         rm -rf "$nmzmail_results"
         ;;

Benjamin Mako Hill || Want to submit a patch?