4 title => 'cli cheat sheet',
9 data => ['data/cli.inc.pl'],
12 my $cmd = Data('data/cli');
17 tbody td {font-size:70%}
21 my ($info, $char, $span) = @_;
22 my ($alias, $help) = @{ $info // [] };
23 printf '<td class="l%s"', $info ? 5 : 1;
24 print ' rowspan="2"' if $span;
27 my ($title) = $alias =~ m{--([\w-]+=?)}
28 or return print $char;
29 $title =~ s/-\K/<wbr>/g;
30 $title =~ s/deref\Kerence/./;
34 my @colchars = ('a'..'z', '?');
35 print '<table class="ccmap"><col>';
36 print qq'<colgroup span="$_">' for scalar @colchars;
37 #say '</colgroup><col>';
38 for my $section (qw{thead tfoot}) {
39 print "<$section><tr><th>↳";
40 print '<th>', EscapeHTML($_) for @colchars;
44 for my $name (sort keys %$cmd) {
45 my $row = $cmd->{$name};
46 print '<tr><th rowspan="2">', $name;
47 showoption($row->{$_}, $_, !$row->{uc $_}) for @colchars;
49 $row->{$_} and showoption($row->{$_}, $_) for map {uc} @colchars;
55 <table class="glyphs"><tr>
56 <td class="X l5">supported
57 <td class="X l1">unsupported
58 <td class="X l0 ex">alias