diff options
author | Eric Wong <e@80x24.org> | 2021-09-21 07:41:55 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-09-21 19:18:35 +0000 |
commit | 8b91bd5f929bf166ee3a79dec43fba0e68b1dc8e (patch) | |
tree | 99a83624c6c34d8f0f7577e259481b23c4619353 /lib/PublicInbox/LeiInspect.pm | |
parent | 1ed1a566c7d300ab8afb604b2e7c939299318005 (diff) | |
download | public-inbox-8b91bd5f929bf166ee3a79dec43fba0e68b1dc8e.tar.gz |
"lei export-kw" no longer completes for anonymous sources. More commands use "lei refresh-mail-sync" as a basis for their completion work, as well. ";AUTH=ANONYMOUS@" is stripped from completions since it was preventing bash completion from working on AUTH=ANONYMOUS IMAP URLs. I'm not sure if there's a better way, but all of our code works fine without specifying AUTH=ANONYMOUS as a command-line arg. Finally, we fallback to using more candidates if none can be found, allowing multiple URLs to be completed.
Diffstat (limited to 'lib/PublicInbox/LeiInspect.pm')
-rw-r--r-- | lib/PublicInbox/LeiInspect.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/PublicInbox/LeiInspect.pm b/lib/PublicInbox/LeiInspect.pm index 8e128580..2158b996 100644 --- a/lib/PublicInbox/LeiInspect.pm +++ b/lib/PublicInbox/LeiInspect.pm @@ -269,10 +269,9 @@ no args allowed on command-line with --stdin } sub _complete_inspect { - my ($lei, @argv) = @_; - my $lms = $lei->lms or return; - my $match_cb = $lei->complete_url_prepare(\@argv); - map { $match_cb->($_) } $lms->folders; + require PublicInbox::LeiRefreshMailSync; + PublicInbox::LeiRefreshMailSync::_complete_refresh_mail_sync(@_); + # TODO: message-ids?, blobs? could get expensive... } 1; |