summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8f83433)
This allows tab-completion for "ls-search" to work with fewer
characters ("ls-s<TAB>" instead of "ls-se<TAB>"), and I expect
"ls-search" to be used more frequently than "ls-mail-sync".
This also matches the --mail-sync switch of "lei import"
lib/PublicInbox/LeiInspect.pm
lib/PublicInbox/LeiLcat.pm
lib/PublicInbox/LeiLsLabel.pm
lib/PublicInbox/LeiInspect.pm
lib/PublicInbox/LeiLcat.pm
lib/PublicInbox/LeiLsLabel.pm
+lib/PublicInbox/LeiLsMailSync.pm
lib/PublicInbox/LeiLsSearch.pm
lib/PublicInbox/LeiLsSearch.pm
-lib/PublicInbox/LeiLsSync.pm
lib/PublicInbox/LeiMailSync.pm
lib/PublicInbox/LeiMirror.pm
lib/PublicInbox/LeiOverview.pm
lib/PublicInbox/LeiMailSync.pm
lib/PublicInbox/LeiMirror.pm
lib/PublicInbox/LeiOverview.pm
'ls-external' => [ '[FILTER]', 'list publicinbox|extindex locations',
qw(format|f=s z|0 globoff|g invert-match|v local remote), @c_opt ],
'ls-label' => [ '', 'list labels', qw(z|0 stats:s), @c_opt ],
'ls-external' => [ '[FILTER]', 'list publicinbox|extindex locations',
qw(format|f=s z|0 globoff|g invert-match|v local remote), @c_opt ],
'ls-label' => [ '', 'list labels', qw(z|0 stats:s), @c_opt ],
-'ls-sync' => [ '', 'list sync folders',
+'ls-mail-sync' => [ '', 'list mail sync folders',
qw(z|0 z|0 globoff|g invert-match|v local remote), @c_opt ],
'forget-external' => [ 'LOCATION...|--prune',
'exclude further results from a publicinbox|extindex',
qw(z|0 z|0 globoff|g invert-match|v local remote), @c_opt ],
'forget-external' => [ 'LOCATION...|--prune',
'exclude further results from a publicinbox|extindex',
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
# front-end for the "lei ls-sync" sub-command
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
# front-end for the "lei ls-sync" sub-command
-package PublicInbox::LeiLsSync;
+package PublicInbox::LeiLsMailSync;
use strict;
use v5.10.1;
use PublicInbox::LeiMailSync;
use strict;
use v5.10.1;
use PublicInbox::LeiMailSync;
my ($lei, $filter) = @_;
my $sto = $lei->_lei_store or return;
my $lms = $sto->search->lms or return;
my ($lei, $filter) = @_;
my $sto = $lei->_lei_store or return;
my $lms = $sto->search->lms or return;
is_deeply(json_utf8->decode($lei_out), {}, 'no inspect stats, yet');
lei_ok('import', $url);
is_deeply(json_utf8->decode($lei_out), {}, 'no inspect stats, yet');
lei_ok('import', $url);
- lei_ok 'ls-sync';
- like($lei_out, qr!\A\Q$url\E;UIDVALIDITY=\d+\n\z!, 'ls-sync');
+ lei_ok 'ls-mail-sync';
+ like($lei_out, qr!\A\Q$url\E;UIDVALIDITY=\d+\n\z!, 'ls-mail-sync');
chomp(my $u = $lei_out);
lei_ok('import', $u, \'UIDVALIDITY match in URL');
$u =~ s/;UIDVALIDITY=(\d+)\s*/;UIDVALIDITY=9$1/s;
chomp(my $u = $lei_out);
lei_ok('import', $u, \'UIDVALIDITY match in URL');
$u =~ s/;UIDVALIDITY=(\d+)\s*/;UIDVALIDITY=9$1/s;
is_deeply($inspect, { sync => { "maildir:$md" => [ 'x:2,S' ] } },
'maildir sync info as expected');
is_deeply($inspect, { sync => { "maildir:$md" => [ 'x:2,S' ] } },
'maildir sync info as expected');
- lei_ok qw(ls-sync);
- is($lei_out, "maildir:$md\n", 'ls-sync as expected');
+ lei_ok qw(ls-mail-sync);
+ is($lei_out, "maildir:$md\n", 'ls-mail-sync as expected');
lei_ok(qw(import), $md, \'import Maildir again');
$imp_err = $lei_err;
lei_ok(qw(import), $md, \'import Maildir again');
$imp_err = $lei_err;