git: 7c81ed3b7c - main - man.cgi: improve error messages in case nothing was found
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 17 Sep 2026 11:15:29 UTC
The branch main has been updated by wosch:
URL: https://cgit.FreeBSD.org/doc/commit/?id=7c81ed3b7cd7ba1ddf98a173f13b9ef2aabd1f8b
commit 7c81ed3b7cd7ba1ddf98a173f13b9ef2aabd1f8b
Author: Wolfram Schneider <wosch@FreeBSD.org>
AuthorDate: 2026-09-17 11:10:32 +0000
Commit: Wolfram Schneider <wosch@FreeBSD.org>
CommitDate: 2026-09-17 11:10:32 +0000
man.cgi: improve error messages in case nothing was found
---
website/content/en/cgi/man.cgi | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/website/content/en/cgi/man.cgi b/website/content/en/cgi/man.cgi
index 342fa87c4f..3faebb1790 100755
--- a/website/content/en/cgi/man.cgi
+++ b/website/content/en/cgi/man.cgi
@@ -1766,8 +1766,11 @@ sub apropos {
if ($query eq '') {
print "<hr/>Empty input. Please type a manual page and search again.\n<hr/>\n";
} else {
- print "Sorry, no data found for `$query'.\n";
- print qq{You may look for other }
+ my $apropos_query = $query . ($sektion ? "($sektion)" : "");
+ print "Sorry, no apropos results found for `$apropos_query'.\n";
+ print qq{Please try a <a href="$BASE?apropos=1&manpath=$manpath&query=$query">keyword search</a>.\n} if $sektion;
+ print "<br/><br/>\n";
+ print qq{You can start a <a href="$www{'cgi_man'}">new search</a> or look for other }
. qq{<a href="https://www.freebsd.org/search/">FreeBSD Search Services</a>.<br/><hr/>\n};
}
}
@@ -1970,17 +1973,17 @@ sub man {
if ( eof(MAN) ) {
if ( $format eq "ascii" ) {
- print "Sorry, no data found for '$html_name'\n";
+ print "Sorry, results found for '$html_name'\n";
return;
}
# print "X $command{'man'} @manargs -- x $name x\n";
print qq{</pre>\n};
- print "Sorry, no data found for `<i>$html_name</i>"
+ print "Sorry, no results found for `<i>$html_name</i>"
. ( $html_section ? "($html_section)" : '' ) . "'.\n";
print
-qq{Please try a <a href="$BASE?apropos=1&manpath=freebsd-release-ports&query=$html_name">keyword search</a>.\n};
- print qq{<p>You may look for other }
+qq{Please try a <a href="$BASE?apropos=1&manpath=$manpath&query=$html_name">keyword search</a>.\n};
+ print qq{<p>You can start a <a href="$www{'cgi_man'}">new search</a> or look for other }
. qq{<a href="https://www.freebsd.org/search/">FreeBSD Search Services</a>.</p><hr/>\n};
&html_footer;
return;