From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 80BCE1F9FF for ; Sat, 27 Mar 2021 11:45:51 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 2/4] lei help: move "lei help" into LeiHelp.pm Date: Sat, 27 Mar 2021 11:45:49 +0000 Message-Id: <20210327114551.3607-3-e@80x24.org> In-Reply-To: <20210327114551.3607-1-e@80x24.org> References: <20210327114551.3607-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We need to load LeiHelp.pm anyways if somebody calls "lei help", so save a few kB RAM for users who don't need help. --- lib/PublicInbox/LEI.pm | 2 -- lib/PublicInbox/LeiHelp.pm | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index eb3ad9e2..e680f5f0 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -787,8 +787,6 @@ sub lei_daemon_kill { kill($sig, $$) or fail($self, "kill($sig, $$): $!"); } -sub lei_help { _help($_[0]) } - # Shell completion helper. Used by lei-completion.bash and hopefully # other shells. Try to do as much here as possible to avoid redundancy # and improve maintainability. diff --git a/lib/PublicInbox/LeiHelp.pm b/lib/PublicInbox/LeiHelp.pm index be31c2a8..9c1b30a1 100644 --- a/lib/PublicInbox/LeiHelp.pm +++ b/lib/PublicInbox/LeiHelp.pm @@ -97,4 +97,7 @@ EOF undef; } +# the "lei help" command +sub lei_help { $_[0]->_help } + 1;