1 # Copyright (C) 2021 all contributors <meta@public-inbox.org>
2 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
4 # "lei ls-label" command
5 package PublicInbox::LeiLsLabel;
9 sub lei_ls_label { # the "lei ls-label" method
10 my ($lei, @argv) = @_;
11 # TODO: document stats/counts (expensive)
12 my @L = eval { $lei->_lei_store->search->all_terms('L') };
13 my $ORS = $lei->{opt}->{z} ? "\0" : "\n";
14 $lei->out(map { $_.$ORS } @L);