about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiXSearch.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-05-02 06:05:37 +0000
committerEric Wong <e@80x24.org>2021-05-03 18:45:24 +0000
commitc2e60999aafbe450b14b0909112965c4b4a7ac00 (patch)
tree6e21d719ba3c325bfb832ef72b761f2cca1fce4e /lib/PublicInbox/LeiXSearch.pm
parenta0269769daa3dcf49de81211738ed96057af3918 (diff)
downloadpublic-inbox-c2e60999aafbe450b14b0909112965c4b4a7ac00.tar.gz
lei <q|up>: combine written/results into one line
Having multiple lines of output mean they can be interleaved in
daemon mode.  Put stats into one line to reduce screen
real-estate size and improve readability.
Diffstat (limited to 'lib/PublicInbox/LeiXSearch.pm')
-rw-r--r--lib/PublicInbox/LeiXSearch.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/PublicInbox/LeiXSearch.pm b/lib/PublicInbox/LeiXSearch.pm
index d212a732..21b15025 100644
--- a/lib/PublicInbox/LeiXSearch.pm
+++ b/lib/PublicInbox/LeiXSearch.pm
@@ -359,9 +359,8 @@ sub query_done { # EOF callback for main daemon
         }
         my $wait = $lei->{sto} ? $lei->{sto}->ipc_do('done') : undef;
         $lei->{ovv}->ovv_end($lei);
-        my (@out, $start_mua);
+        my $start_mua;
         if ($l2m) { # close() calls LeiToMail reap_compress
-                @out = (" in $lei->{ovv}->{dst}");
                 if (my $out = delete $lei->{old_1}) {
                         if (my $mbout = $lei->{1}) {
                                 close($mbout) or return $lei->fail(<<"");
@@ -379,9 +378,11 @@ Error closing $lei->{ovv}->{dst}: $!
                 }
         }
         if ($lei->{-progress}) {
-                $lei->qerr('# ', $lei->{-mset_total} // 0, " matches", @out);
+                my $tot = $lei->{-mset_total} // 0;
                 my $nr = $lei->{-nr_write} // 0;
-                $lei->qerr("# $nr written to $lei->{ovv}->{dst}") if $l2m;
+                $lei->qerr($l2m ?
+                        "# $nr written to $lei->{ovv}->{dst} ($tot matches)" :
+                        "# $tot matches");
         }
         $lei->start_mua if $start_mua;
         $lei->dclose;