use PublicInbox::LeiOverview;
sub lei_up {
- my ($lei, $dir) = @_;
+ my ($lei, $out) = @_;
$lei->{lse} = $lei->_lei_store(1)->search;
- my $lss = PublicInbox::LeiSavedSearch->new($lei, $dir) or return;
+ my $lss = PublicInbox::LeiSavedSearch->new($lei, $out) or return;
my $mset_opt = $lei->{mset_opt} = { relevance => -2 };
$mset_opt->{limit} = $lei->{opt}->{limit} // 10000;
my $q = $mset_opt->{q_raw} = $lss->{-cfg}->{'lei.q'} //
}
$lei->{opt}->{output} = $lss->{-cfg}->{'lei.q.output'} //
return $lei->fail("lei.q.output unset in $lss->{-f}");
- $lei->{opt}->{'format'} //= $lss->{-cfg}->{'lei.q.format'}; # optional
my $to_avref = $lss->{-cfg}->can('_array');
for my $k (qw(only include exclude)) {
$lei->_start_query;
}
+sub _complete_up {
+ my ($lei, @argv) = @_;
+ my ($cur, $re) = $lei->complete_url_common(\@argv);
+ grep(/\A$re\Q$cur/, PublicInbox::LeiSavedSearch::list($lei));
+}
+
1;