]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Search.pm
search: fix argv handling of quoted phrases
[public-inbox.git] / lib / PublicInbox / Search.pm
index 76a270bca0c01e9c6121c530ff405594f04d6114..b3fd532d80db1461b6604a60e08dfe9deeeeb04e 100644 (file)
@@ -330,8 +330,10 @@ sub query_argv_to_string {
                if (s!\b(d|rt|dt):([[:print:]]+)\z!date_parse_prepare(
                                                $to_parse //= [], $1, $2)!sge) {
                        $_;
+               } elsif (/\s/) {
+                       s/(.*?)\b(\w+:)// ? qq{$1$2"$_"} : qq{"$_"};
                } else {
-                       /\s/ ? (s/\A(\w+:)// ? qq{$1"$_"} : qq{"$_}) : $_
+                       $_
                }
        } @$argv);
        # git-rev-parse can handle any number of args up to system