]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei: remove --mua-cmd alias for --mua
authorEric Wong <e@80x24.org>
Sun, 7 Feb 2021 08:51:55 +0000 (08:51 +0000)
committerEric Wong <e@80x24.org>
Sun, 7 Feb 2021 22:57:14 +0000 (22:57 +0000)
While "mua-cmd" may be more accurate, nobody is expected
to type 4 extra characters.  It's a needless ambiguity
with no precedence or prior art to follow.

Link: https://public-inbox.org/meta/20210206090119.GA14519@dcvr/
Documentation/lei-q.pod
lib/PublicInbox/LEI.pm
lib/PublicInbox/LeiHelp.pm
t/lei.t

index 5c0ca843fbc335ef2d0bd33fcd35f1ce33d0dfb9..07c742d20d4512f1d89e084eb0def23731b72f1d 100644 (file)
@@ -36,7 +36,7 @@ Pretty print C<json> or C<concatjson> 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<mutt -f %f>).
 For a subset of MUAs known to accept a mailbox via C<-f>, COMMAND can
index 21862488fabb484fad491fbc59447c2bd8deca59..818f2cfbcd16ae3d9920041fb247df06f417cf13 100644 (file)
@@ -112,7 +112,7 @@ our %CMD = ( # sorted in order of importance/use:
        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 @@ my %OPTDESC = (
 '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 exec_buf ($$) {
 
 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/) {
index 43414ab4a9874b1a4b901212cb64183316693274..e62298f7d8176b9595235c479174ce6db1d5a6d5 100644 (file)
@@ -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 (file)
--- a/t/lei.t
+++ b/t/lei.t
@@ -104,7 +104,7 @@ my $test_completion = sub {
        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");