From 2018db2a23ab1d949c757c264534f39dba338ccb Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 18 Apr 2021 08:40:14 +0000 Subject: lei ls-search: command to list saved searches Going forward, we'll probably support JSON for all the "ls-*" subcommands. This also provides the basis for "lei up" shell completion. --- lib/PublicInbox/LeiUp.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/PublicInbox/LeiUp.pm') diff --git a/lib/PublicInbox/LeiUp.pm b/lib/PublicInbox/LeiUp.pm index 9fe4901b..73286ea2 100644 --- a/lib/PublicInbox/LeiUp.pm +++ b/lib/PublicInbox/LeiUp.pm @@ -42,4 +42,10 @@ sub lei_up { $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; -- cgit v1.2.3-24-ge0c7