From e9ab65063d00a7b9b20c369316ec3c9e26e40bf6 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 12 Mar 2021 10:39:42 +0000 Subject: lei: rearrange OPT_DESC and drop some TBD switches It'll be easier for us to have the option-spec in front of the command instead of the other way around. The option-spec in front makes it easier to sort and keep track of potentially confusing/ambiguous use of command-line switches between different commands. We'll also update some of the proposed switches while we're at it. --- lib/PublicInbox/LeiHelp.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/LeiHelp.pm') diff --git a/lib/PublicInbox/LeiHelp.pm b/lib/PublicInbox/LeiHelp.pm index a654e1c2..be31c2a8 100644 --- a/lib/PublicInbox/LeiHelp.pm +++ b/lib/PublicInbox/LeiHelp.pm @@ -20,7 +20,7 @@ sub call { my @opt_desc; my $lpad = 2; for my $sw (grep { !ref } @info) { # ("prio=s", "z", $GLP_PASS) - my $desc = $OPTDESC->{"$cmd\t$sw"} // $OPTDESC->{$sw} // next; + my $desc = $OPTDESC->{"$sw\t$cmd"} // $OPTDESC->{$sw} // next; my $arg_vals = ''; ($arg_vals, $desc) = @$desc if ref($desc) eq 'ARRAY'; -- cgit v1.2.3-24-ge0c7