diff options
author | Eric Wong <e@80x24.org> | 2021-02-10 08:59:26 -0100 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-02-10 19:21:47 +0000 |
commit | efae1c2f67220c18f57bd1ebdf7115abd4d6c6e0 (patch) | |
tree | 0123b9c732525e40e199d2fdfb558d9ef2fcab33 /lib/PublicInbox/Search.pm | |
parent | 9eb840de546dfe9b6c6aa1588f5bb8c0153c7d71 (diff) | |
download | public-inbox-efae1c2f67220c18f57bd1ebdf7115abd4d6c6e0.tar.gz |
This fixes both an old bug in "lei q" argv handling and one recent regression introduced with the change to use approxidate. Field prefixes are also handled correctly inside parenthesized statements when the field follows "(" without a separation character. Fixes: fbb7ccabbf54a405 ("lei q: use git approxidate with d:, dt: and rt: ranges")
Diffstat (limited to 'lib/PublicInbox/Search.pm')
-rw-r--r-- | lib/PublicInbox/Search.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm index 76a270bc..b3fd532d 100644 --- a/lib/PublicInbox/Search.pm +++ b/lib/PublicInbox/Search.pm @@ -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 |