If you run man on a page that is redirected by a ".so " instruction, and your output is not going to stdout, man(1) now instead tries to cat the first file in your CWD.
Due to:
author Wolfram Schneider <wosch@FreeBSD.org> 2024-01-13 16:16:55 +0000
commit e3c7b76fa8105929ae9a785e5ffc44274b1b0a81
The changes here move the glob checking to the "is_exist" function.
However, in "man_check_for_so()", there is the line:
if ! check_man "$path/$tstr" ""; then
(because there is no corresponding "cat" page to check in this case.)
But now, "exists()" checks for the first glob match to ""* , hence matches the first file in the current directory.
A suggested fix is to modify "check_man()" to first check that the parameter is not null before continuing. (The attached patch does just that)
Obviously there are many places to fix this issue, so you may prefer to fix it within a different function! I have no beef with that!