user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Eric Wong <>
Subject: [RFC 2/2] search: disallow spaces in argv approxidate queries
Date: Wed, 10 Feb 2021 18:57:59 -0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

This is for consistency with --stdin and WWW front ends
which can't distinguish between phrase searches and
prefix ranges used for d:/dt:/rt:.

In any case, I expect users on the lei command-line are more
likely to use `5.days.ago' instead of `"5 days ago"'
 lib/PublicInbox/ | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/PublicInbox/ b/lib/PublicInbox/
index 8e4cce33..520aa31d 100644
--- a/lib/PublicInbox/
+++ b/lib/PublicInbox/
@@ -337,7 +337,7 @@ sub query_argv_to_string {
 	my (undef, $git, $argv) = @_;
 	my $to_parse;
 	my $tmp = join(' ', map {;
-		if (s!\b(d|rt|dt):([[:print:]]+)\z!date_parse_prepare(
+		if (s!\b(d|rt|dt):(\S+)\z!date_parse_prepare(
 						$to_parse //= [], $1, $2)!sge) {
 		} elsif (/\s/) {

  parent reply	other threads:[~2021-02-10 19:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-10 19:57 [PATCH 0/2] WWW + "lei q --stdin": support git approxidate Eric Wong
2021-02-10 19:57 ` [PATCH 1/2] search: use git approxidate in WWW and "lei q --stdin" Eric Wong
2021-02-11  1:09   ` [SQUASH 3/2] t/search.t: fix offset error Eric Wong
2021-02-10 19:57 ` Eric Wong [this message]
2021-02-12  4:34 ` [PATCH 0/2] WWW + "lei q --stdin": support git approxidate Kyle Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \
    --subject='Re: [RFC 2/2] search: disallow spaces in argv approxidate queries' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

user/dev discussion of public-inbox itself

This inbox may be cloned and mirrored by anyone:

	git clone --mirror
	git clone --mirror http://czquwvybam4bgbro.onion/meta
	git clone --mirror http://hjrcffqmbrq6wope.onion/meta
	git clone --mirror http://ou63pmih66umazou.onion/meta

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 meta meta/ \
	public-inbox-index meta

Example config snippet for mirrors.
Newsgroups are available over NNTP:
 note: .onion URLs require Tor:

code repositories for project(s) associated with this inbox:

AGPL code for this site: git clone