* [PATCH 0/5] lei: more UI/UX tweaks
@ 2021-05-01 6:21 7% Eric Wong
2021-05-01 6:21 7% ` [PATCH 4/5] lei: rename ls-sync to ls-mail-sync Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2021-05-01 6:21 UTC (permalink / raw)
To: meta
4/5 is an incompatible change of an incomplete feature
2/5 is something I noticed from using "lei up --all=local"
Editing searches is less surprising, as lei.q.output updates
and auto-conversion are now supported (since there's no
"lei mv-search").
Eric Wong (5):
xt/lei-onion-convert: test for NNTP+IMAP onions
lei <q|up>: distinguish between mset and l2m counts
lei_saved_search: fix excess indent for first lei.q entry
lei: rename ls-sync to ls-mail-sync
lei edit-search: support relocating lei.q.output
MANIFEST | 3 +-
lib/PublicInbox/LEI.pm | 2 +-
lib/PublicInbox/LeiConvert.pm | 5 +-
lib/PublicInbox/LeiEditSearch.pm | 15 ++++-
.../{LeiLsSync.pm => LeiLsMailSync.pm} | 4 +-
lib/PublicInbox/LeiSavedSearch.pm | 53 +++++++++++++++-
lib/PublicInbox/LeiToMail.pm | 36 ++++++-----
lib/PublicInbox/LeiXSearch.pm | 18 ++++--
script/lei | 7 +++
t/lei-import-imap.t | 4 +-
t/lei-import-maildir.t | 4 +-
xt/lei-onion-convert.t | 61 +++++++++++++++++++
12 files changed, 180 insertions(+), 32 deletions(-)
rename lib/PublicInbox/{LeiLsSync.pm => LeiLsMailSync.pm} (93%)
create mode 100644 xt/lei-onion-convert.t
^ permalink raw reply [relevance 7%]
* [PATCH 4/5] lei: rename ls-sync to ls-mail-sync
2021-05-01 6:21 7% [PATCH 0/5] lei: more UI/UX tweaks Eric Wong
@ 2021-05-01 6:21 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2021-05-01 6:21 UTC (permalink / raw)
To: meta
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"
---
MANIFEST | 2 +-
lib/PublicInbox/LEI.pm | 2 +-
lib/PublicInbox/{LeiLsSync.pm => LeiLsMailSync.pm} | 4 ++--
t/lei-import-imap.t | 4 ++--
t/lei-import-maildir.t | 4 ++--
5 files changed, 8 insertions(+), 8 deletions(-)
rename lib/PublicInbox/{LeiLsSync.pm => LeiLsMailSync.pm} (93%)
diff --git a/MANIFEST b/MANIFEST
index 82f25735..b7e55793 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -202,8 +202,8 @@ lib/PublicInbox/LeiInput.pm
lib/PublicInbox/LeiInspect.pm
lib/PublicInbox/LeiLcat.pm
lib/PublicInbox/LeiLsLabel.pm
+lib/PublicInbox/LeiLsMailSync.pm
lib/PublicInbox/LeiLsSearch.pm
-lib/PublicInbox/LeiLsSync.pm
lib/PublicInbox/LeiMailSync.pm
lib/PublicInbox/LeiMirror.pm
lib/PublicInbox/LeiOverview.pm
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm
index bb67fc0b..5d701d5e 100644
--- a/lib/PublicInbox/LEI.pm
+++ b/lib/PublicInbox/LEI.pm
@@ -170,7 +170,7 @@ our %CMD = ( # sorted in order of importance/use:
'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',
diff --git a/lib/PublicInbox/LeiLsSync.pm b/lib/PublicInbox/LeiLsMailSync.pm
similarity index 93%
rename from lib/PublicInbox/LeiLsSync.pm
rename to lib/PublicInbox/LeiLsMailSync.pm
index 71f111a9..2b3d326d 100644
--- a/lib/PublicInbox/LeiLsSync.pm
+++ b/lib/PublicInbox/LeiLsMailSync.pm
@@ -2,12 +2,12 @@
# 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;
-sub lei_ls_sync {
+sub lei_ls_mail_sync {
my ($lei, $filter) = @_;
my $sto = $lei->_lei_store or return;
my $lms = $sto->search->lms or return;
diff --git a/t/lei-import-imap.t b/t/lei-import-imap.t
index c977c68e..3a1fff4c 100644
--- a/t/lei-import-imap.t
+++ b/t/lei-import-imap.t
@@ -22,8 +22,8 @@ test_lei({ tmpdir => $tmpdir }, sub {
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;
diff --git a/t/lei-import-maildir.t b/t/lei-import-maildir.t
index 808e1a73..02fe43e1 100644
--- a/t/lei-import-maildir.t
+++ b/t/lei-import-maildir.t
@@ -40,8 +40,8 @@ test_lei(sub {
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;
^ permalink raw reply related [relevance 7%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2021-05-01 6:21 7% [PATCH 0/5] lei: more UI/UX tweaks Eric Wong
2021-05-01 6:21 7% ` [PATCH 4/5] lei: rename ls-sync to ls-mail-sync Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).