]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei up: improve error for multiple lei.q values
authorEric Wong <e@80x24.org>
Mon, 31 Oct 2022 21:52:59 +0000 (21:52 +0000)
committerEric Wong <e@80x24.org>
Wed, 2 Nov 2022 17:04:21 +0000 (17:04 +0000)
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

index 5ad214518e90b45a08b5701db51e582c3fe3980f..499173393ca6ff3f43a017417945f8d993618c82 100644 (file)
@@ -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 <<EOM if scalar(@$q) > 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);