From 9f44271ce77c246cd0599b6dcd825503d919e3be Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 27 Mar 2021 11:45:49 +0000 Subject: [PATCH] lei help: move "lei help" into LeiHelp.pm 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; -- 2.44.0