From a3069519309207e204e7686925ef188b4ea4effb Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 2 Nov 2021 18:14:45 +0000 Subject: lei : stdin implies `-F eml' These commands are usually run on a single message, so saving the user the trouble of typing `-F eml' on the command-line seems reasonable. I don't think commands like "index" and "import" will be too useful for single messages, though. --- lib/PublicInbox/LeiRm.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/LeiRm.pm') diff --git a/lib/PublicInbox/LeiRm.pm b/lib/PublicInbox/LeiRm.pm index 62423ac9..00b12485 100644 --- a/lib/PublicInbox/LeiRm.pm +++ b/lib/PublicInbox/LeiRm.pm @@ -16,7 +16,7 @@ sub input_eml_cb { # used by PublicInbox::LeiInput::input_fh sub lei_rm { my ($lei, @inputs) = @_; $lei->_lei_store(1)->write_prepare($lei); - $lei->{opt}->{'in-format'} //= 'eml'; + $lei->{opt}->{'in-format'} //= 'eml' if $lei->{opt}->{stdin}; my $self = bless {}, __PACKAGE__; $self->prepare_inputs($lei, \@inputs) or return; $lei->{-err_type} = 'non-fatal'; -- cgit v1.2.3-24-ge0c7