From: Eric Wong <e@80x24.org> To: meta@public-inbox.org Subject: [PATCH] lei import: add label completions (+L:$LABEL) Date: Mon, 2 May 2022 18:10:07 +0000 [thread overview] Message-ID: <20220502181007.541651-1-e@80x24.org> (raw) This can probably be added for "lei q", too, but we typically import first. Labels can probably be made persistent on a per-folder basis in the future. --- lib/PublicInbox/LeiImport.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/PublicInbox/LeiImport.pm b/lib/PublicInbox/LeiImport.pm index b9865829..2d91e4c4 100644 --- a/lib/PublicInbox/LeiImport.pm +++ b/lib/PublicInbox/LeiImport.pm @@ -117,6 +117,8 @@ sub _complete_import { my ($lei, @argv) = @_; my ($re, $cur, $match_cb) = $lei->complete_url_prepare(\@argv); my @k = $lei->url_folder_cache->keys($argv[-1] // undef, 1); + my @L = eval { $lei->_lei_store->search->all_terms('L') }; + push(@k, map { "+L:$_" } @L); my @m = map { $match_cb->($_) } @k; my %f = map { $_ => 1 } (@m ? @m : @k); if (my $lms = $lei->lms) {
reply other threads:[~2022-05-02 18:10 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style List information: https://public-inbox.org/README * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220502181007.541651-1-e@80x24.org \ --to=e@80x24.org \ --cc=meta@public-inbox.org \ --subject='Re: [PATCH] lei import: add label completions (+L:$LABEL)' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
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).