2 use List::Util qw(sum max first);
5 title => 'Shell compatibility cheat sheet',
7 stylesheet => [qw'circus dark mono red light'],
8 data => ['shell.inc.pl'],
11 say "<h1>Shell compatibility</h1>\n";
13 my $data = do 'shell.inc.pl' or die $@ || $!;
14 my @agents = keys %{ $data->{agents} };
16 print '<table class="mapped">';
17 print '<col>'; # should match first thead row
18 printf '<colgroup span="%d">', 1 for @agents;
19 say '</colgroup><col>';
25 sprintf('<th>%s', Entity($_->{name}))
26 } @{ $data->{agents} }{@agents}),
28 print '<thead>', $header;
30 say '<tfoot>', $header;
34 print '<td>', Entity($row->{title});
38 Y => 'feature can be done',
39 N => 'feature is not present',
40 F => 'feature can only be done by using the shells function mechanism',
41 L => 'the readline library must be linked into the shell to enable this feature',
51 my ($row, $agent) = @_;
52 my $stat = $row->{support}->{$agent};
54 $DSTATS{$stat} // 'unknown support',
57 printf('<td class="%s" title="%s">%s',
68 $a->{title} cmp $b->{title}
69 } @{ $data->{feature} }) {
70 (my $id = lc $row->{title}) =~ s/\W+/-/g;
71 printf '<tr id="%s">', $id;
73 saysupportcols($row, $_) for @agents;