unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH] lei_input: provide hint for bare "L:" and "kw:"
@ 2021-09-08 19:03 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2021-09-08 19:03 UTC (permalink / raw)
  To: meta

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(<<"");

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-08 19:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-08 19:03 [PATCH] lei_input: provide hint for bare "L:" and "kw:" Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).