From: Johannes Weißl Date: Sun, 5 Dec 2010 03:30:22 +0000 (+0100) Subject: quote namazu search term X-Git-Url: https://projects.mako.cc/source/muttjump/commitdiff_plain/0fe964f9fe98ad94eadc5b05bead10a71c9dcf5e quote namazu search term --- diff --git a/muttjump b/muttjump index 53a44bb..fb9bde0 100755 --- 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" ;;