From efac06297ad19bdda330dc1c1de00f78b4ef9d39 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 31 Oct 2022 21:52:59 +0000 Subject: [PATCH] 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'. --- lib/PublicInbox/LeiUp.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); -- 2.44.0