git: 1661a0bd55 - main - man.cgi: improve os grouping on help page
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 30 Sep 2026 08:45:02 UTC
The branch main has been updated by wosch:
URL: https://cgit.FreeBSD.org/doc/commit/?id=1661a0bd55d6c7a08d8c0ff1178e4b54e7a07aef
commit 1661a0bd55d6c7a08d8c0ff1178e4b54e7a07aef
Author: Wolfram Schneider <wosch@FreeBSD.org>
AuthorDate: 2026-09-30 08:44:57 +0000
Commit: Wolfram Schneider <wosch@FreeBSD.org>
CommitDate: 2026-09-30 08:44:57 +0000
man.cgi: improve os grouping on help page
---
website/content/en/cgi/man.cgi | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/website/content/en/cgi/man.cgi b/website/content/en/cgi/man.cgi
index d03f3314dd..4b1d6c83c5 100755
--- a/website/content/en/cgi/man.cgi
+++ b/website/content/en/cgi/man.cgi
@@ -1343,8 +1343,13 @@ sub sort_manpath {
sub grouping_os {
my $os = shift;
+ # Plan 9
+ if ($os =~ /^([A-Za-z]+)\s+\d$/) {
+ return $os;
+ }
+
# FreeBSD 13.5-RELEASE and Ports: "FreeBSD"
- if ($os =~ /^([A-Za-z0-9\-]+)\s+\d/) {
+ elsif ($os =~ /^([A-Za-z0-9\-]+)\s+\d/) {
return $1;
}
@@ -1354,7 +1359,7 @@ sub grouping_os {
}
# Dell UNIX SVR4 2.2: "Dell UNIX"
- elsif ($os =~ /^([A-Za-z]+\s+[A-Za-z]+)/) {
+ elsif ($os =~ /^([A-Za-z]+\s+[A-Za-z]+)\s.*\d/) {
return $1;
}
@@ -1368,11 +1373,6 @@ sub grouping_os {
return $1;
}
- # OSF1 V5.1/alpha: "OSF1"
- elsif ($os =~ /^([A-Za-z0-1]+\s+[A-Za-z])/) {
- return $1;
- }
-
# first word
elsif ($os =~ /^(\w+)/) {
return $1;
@@ -2586,8 +2586,12 @@ sub detail_html {
my ($os_group, $os_group_lc, @l) = @_;
my @list;
+ my $text = scalar(@l) . " release";
+ # release <-> releases
+ $text .= "s" if scalar(@l) > 1;
+
push @list, qq[<details id="$os_group_lc">\n];
- push @list, qq|<summary>$os_group (@{[ scalar(@l) ]} releases)</summary>\n|;
+ push @list, qq|<summary>$os_group ($text)</summary>\n|;
push @list, "<ul>\n", @l, "</ul>\n</details>\n";
return @list;