From: Eric Wong Date: Mon, 31 Oct 2022 21:52:59 +0000 (+0000) Subject: lei up: improve error for multiple lei.q values X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=efac06297ad19bdda330dc1c1de00f78b4ef9d39;p=public-inbox.git lei up: improve error for multiple lei.q values Point users towards the lei.internal.rawstr variable which may be tripping up handling of lei.q after `lei edit-search'. --- diff --git a/lib/PublicInbox/LeiUp.pm b/lib/PublicInbox/LeiUp.pm index 5ad21451..49917339 100644 --- a/lib/PublicInbox/LeiUp.pm +++ b/lib/PublicInbox/LeiUp.pm @@ -32,8 +32,10 @@ sub up1 ($$) { my $rawstr = $lss->{-cfg}->{'lei.internal.rawstr'} // (scalar(@$q) == 1 && substr($q->[0], -1) eq "\n"); if ($rawstr) { - scalar(@$q) > 1 and - die "$f: lei.q has multiple values (@$q) (out=$out)\n"; + die < 1; +$f: lei.q has multiple values (@$q) (out=$out) +$f: while lei.internal.rawstr is set +EOM $lse->query_approxidate($lse->git, $mset_opt->{qstr} = $q->[0]); } else { $mset_opt->{qstr} = $lse->query_argv_to_string($lse->git, $q);