diff options
author | Eric Wong <e@80x24.org> | 2021-04-18 08:40:14 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-04-18 19:04:42 -0400 |
commit | 2018db2a23ab1d949c757c264534f39dba338ccb (patch) | |
tree | 86a06bda17018b97d760d579aa7214f68e1ab42e /lib/PublicInbox/LeiUp.pm | |
parent | 3b7b5442c4321ae802867cbda9bd33235ab2a5a3 (diff) | |
download | public-inbox-2018db2a23ab1d949c757c264534f39dba338ccb.tar.gz |
Going forward, we'll probably support JSON for all the "ls-*" subcommands. This also provides the basis for "lei up" shell completion.
Diffstat (limited to 'lib/PublicInbox/LeiUp.pm')
-rw-r--r-- | lib/PublicInbox/LeiUp.pm | 6 |
1 files changed, 6 insertions, 0 deletions
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; |