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-ASN: 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 F1ADD1F8C6 for ; Wed, 8 Sep 2021 19:03:59 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] lei_input: provide hint for bare "L:" and "kw:" Date: Wed, 8 Sep 2021 19:03:59 +0000 Message-Id: <20210908190359.3716-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: I just made this mistake running "lei import" myself, so I figure giving a hint makes sense, here. --- lib/PublicInbox/LeiInput.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/LeiInput.pm b/lib/PublicInbox/LeiInput.pm index cb71e97c..8ce445c8 100644 --- a/lib/PublicInbox/LeiInput.pm +++ b/lib/PublicInbox/LeiInput.pm @@ -276,7 +276,10 @@ sub prepare_inputs { # returns undef on error $may_sync and $input = 'maildir:'. $lei->abs_path($input_path); } else { - return $lei->fail("Unable to handle $input"); + my $m = "Unable to handle $input"; + $input =~ /\A(?:L|kw):/ and + $m .= ", did you mean +$input?"; + return $lei->fail($m); } } elsif ($input =~ /\.(?:eml|patch)\z/i && -f $input) { lc($in_fmt//'eml') eq 'eml' or return $lei->fail(<<"");