Documentation/lei-q.pod | 2 +- lib/PublicInbox/LEI.pm | 6 +++--- lib/PublicInbox/LeiHelp.pm | 2 +- t/lei.t | 2 +- diff --git a/Documentation/lei-q.pod b/Documentation/lei-q.pod index 5c0ca843fbc335ef2d0bd33fcd35f1ce33d0dfb9..07c742d20d4512f1d89e084eb0def23731b72f1d 100644 --- a/Documentation/lei-q.pod +++ b/Documentation/lei-q.pod @@ -36,7 +36,7 @@ Pretty print C or C output. If stdout is opened to a tty and used as the C<--output> destination, C<--pretty> is enabled by default. -=item --mua-cmd=COMMAND, --mua=COMMAND +=item --mua=COMMAND A command to run on C<--output> Maildir or mbox (e.g., C). For a subset of MUAs known to accept a mailbox via C<-f>, COMMAND can diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index 21862488fabb484fad491fbc59447c2bd8deca59..818f2cfbcd16ae3d9920041fb247df06f417cf13 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -112,7 +112,7 @@ 'q' => [ '--stdin|SEARCH_TERMS...', 'search for messages matching terms', qw( save-as=s output|mfolder|o=s format|f=s dedupe|d=s thread|t augment|a sort|s=s reverse|r offset=i remote! local! external! pretty include|I=s@ exclude=s@ only=s@ jobs|j=s globoff|g stdin| - mua-cmd|mua=s no-torsocks torsocks=s verbose|v+ quiet|q), + mua=s no-torsocks torsocks=s verbose|v+ quiet|q), PublicInbox::LeiQuery::curl_opt(), opt_dash('limit|n=i', '[0-9]+') ], 'show' => [ 'MID|OID', 'show a given object (Message-ID or object ID)', @@ -232,7 +232,7 @@ 'output|mfolder|o=s' => [ 'MFOLDER', "destination (e.g.\xa0`/path/to/Maildir', ". "or\xa0`-'\x{a0}for\x{a0}stdout)" ], -'mua-cmd|mua=s' => [ 'CMD', +'mua=s' => [ 'CMD', "MUA to run on --output Maildir or mbox (e.g.\xa0`mutt\xa0-f\xa0%f')" ], 'show format|f=s' => [ 'OUT|plain|raw|html|mboxrd|mboxcl2|mboxcl', @@ -723,7 +723,7 @@ } sub start_mua { my ($self) = @_; - my $mua = $self->{opt}->{'mua-cmd'} // return; + my $mua = $self->{opt}->{mua} // return; my $mfolder = $self->{ovv}->{dst}; my (@cmd, $replaced); if ($mua =~ /\A(?:mutt|mailx|mail|neomutt)\z/) { diff --git a/lib/PublicInbox/LeiHelp.pm b/lib/PublicInbox/LeiHelp.pm index 43414ab4a9874b1a4b901212cb64183316693274..e62298f7d8176b9595235c479174ce6db1d5a6d5 100644 --- a/lib/PublicInbox/LeiHelp.pm +++ b/lib/PublicInbox/LeiHelp.pm @@ -7,7 +7,7 @@ use strict; use v5.10.1; use Text::Wrap qw(wrap); -my %NOHELP = map { $_ => 1 } qw(mua-cmd mfolder); +my %NOHELP = map { $_ => 1 } qw(mfolder); sub call { my ($self, $errmsg, $CMD, $OPTDESC) = @_; diff --git a/t/lei.t b/t/lei.t index f789f63aa3dd606effd7ced08b35d76882015ffb..8e771eb5e54490faad4b53c6fff2052de85f8b86 100644 --- a/t/lei.t +++ b/t/lei.t @@ -104,7 +104,7 @@ ok($lei->(qw(_complete lei q)), 'complete q (no args)'); %out = map { $_ => 1 } split(/\s+/s, $lei_out); for my $sw (qw(-f --format -o --output --mfolder --augment -a - --mua --mua-cmd --no-local --local --verbose -v + --mua --no-local --local --verbose -v --save-as --no-remote --remote --torsocks --reverse -r )) { ok($out{$sw}, "$sw offered as `lei q' completion");