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';
@vals = (' [', undef, ']');
} elsif ($x =~ s/=.+//) { # required arg: $x = "type=s"
@vals = (' ', undef);
- } # else: no args $x = 'thread|t'
+ } # else: no args $x = 'threads|t'
# we support underscore options from public-inbox-* commands;
# but they've never been documented and will likely go away.
for (grep { !/_/ && !$NOHELP{$_} } split(/\|/, $x)) {
length($_) > 1 ? push(@l, "--$_") : push(@s, "-$_");
}
- if (!scalar(@vals)) { # no args 'thread|t'
- } elsif ($arg_vals =~ s/\A([A-Z_]+)\b//) { # "NAME"
+ if (!scalar(@vals)) { # no args 'threads|t'
+ } elsif ($arg_vals =~ s/\A([A-Z_=]+)\b//) { # "NAME"
$vals[1] = $1;
} else {
$vals[1] = uc(substr($l[0], 2)); # "--type" => "TYPE"
undef;
}
+# the "lei help" command
+sub lei_help { $_[0]->_help }
+
1;