<(common.inc.plp)><: use List::Util qw(sum max first); Html({ title => 'Shell compatibility cheat sheet', version => '1.0', stylesheet => [qw'circus dark mono red light'], data => ['shell.inc.pl'], }); say "

Shell compatibility

\n"; my $data = do 'shell.inc.pl' or die $@ || $!; my @agents = keys %{ $data->{agents} }; print ''; print ''; # should match first thead row printf '', 1 for @agents; say ''; my $header = join('', '', '', $header; say ''; say '', $header; sub saytitlecol { my ($row) = @_; print ''; for my $row (sort { $a->{title} cmp $b->{title} } @{ $data->{feature} }) { (my $id = lc $row->{title}) =~ s/\W+/-/g; printf '', $id; saytitlecol($row); saysupportcols($row, $_) for @agents; say ''; } say ''; say '
feature', (map { sprintf('%s', Entity($_->{name})) } @{ $data->{agents} }{@agents}), ); print '
', Entity($row->{title}); } my %DSTATS = ( Y => 'feature can be done', N => 'feature is not present', F => 'feature can only be done by using the shells function mechanism', L => 'the readline library must be linked into the shell to enable this feature', ); my %CSTATS = ( N => 'l1', F => 'l2', L => 'l4', Y => 'l5', ); sub saysupportcols { my ($row, $agent) = @_; my $stat = $row->{support}->{$agent}; my $title = join(' ', $DSTATS{$stat} // 'unknown support', 'in', $agent, ); printf('%s', join(' ', X => $CSTATS{$stat}, ), $title, $stat, ); } say '
';