Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

man does not work properly in macOS 13 than older macOS

I was writing a manpage, and was trying to view it with the `man` command, however, in macOS 13, the file could not be opened. In older macOS or linux platform, `man` is able to display the manpage file properly. Is there a change in man or even other system app in macOS 13? Below is the shorten and sanitised manpage for better view:

.\" Manpage for func.
.TH func 1 "08 Nov 2022" "1.0" "func man page"
.SH NAME
\fBfunc\fR - short desc.

.SH SYNOPSIS
\fBfunc\fR [\fB-h\fR] [\fB-D\fR \fIpath/to/destination\fR]

.SH DESCRIPTION
\fBiid_query.sh\fsome # more '\fIabc\fR'. other '\fI_abc\fR' continue name\*(lq\fI./abc\fR\*(rq.
.br
.B "    some    other"

.SH OPTIONS
\fB-D\fR \fIpath/to/destination\fR
.br
    The path of the destination directory.
.LP
\fB-h\fR
.br
    Display the usage.

.SH BUGS
No known bugs.

.SH AUTHOR
Someone


The command I tried to call man utility is:

$ man ./func

where `./func` is the manpage file.

Posted on Nov 9, 2022 8:56 AM

Reply
9 replies

Nov 9, 2022 9:46 AM in response to jimmymcheung

Save it as a plain text file: func.1 and then your man command will work to present the output on your Terminal screen.


man ./func.1
man -man ./func.1
mandoc -Tpdf $(man -w ./func.1) | open -f -a Preview





I have the blue coloration because in my Terminal settings… I have set that color to Bold Text on the Profiles > Text panel, and I prefer a darked out Terminal window.


In the mandoc example above, I have shown for the func.1 in the current directory, but for existing man pages in the System, you would simply state the name of the man page without any extension and man -w will return the full path of that man page to mandoc.


mandoc -Tpdf -man $(man -w zshparam) | open -f -a Preview



Nov 10, 2022 5:19 AM in response to VikingOSX

The man still return error, however, manioc can produce proper format manpage in pdf. Also man version cannot be retrieved. The error output see below (sanitised):

% man -man ../../man/func.1
zcat: can't stat: part_of_parent_name (part_of_parent_name.gz): No such file or directory
zcat: can't stat: other_part_of_parent_name/func.1 (other_part_of_parent_name/func.1.gz): No such file or directory
% man -V
/usr/bin/man: illegal option -- V
Usage:
 man [-adho] [-t | -w] [-M manpath] [-P pager] [-S mansect]
     [-m arch[:machine]] [-p [eprtv]] [mansect] page [...]
 man -f page [...] -- Emulates whatis(1)
 man -k page [...] -- Emulates apropos(1)
% man --version
/usr/bin/man: illegal option -- -
Usage:
 man [-adho] [-t | -w] [-M manpath] [-P pager] [-S mansect]
     [-m arch[:machine]] [-p [eprtv]] [mansect] page [...]
 man -f page [...] -- Emulates whatis(1)
 man -k page [...] -- Emulates apropos(1)

Maybe zsh on this specific macOS version does not escape space in directory/file name after expanding the relative path, because the path man take is fragmented. It also produce same error even if I quote the relative path.

Build in manual can display normally (like `man man`).

Nov 14, 2022 4:07 AM in response to etresoft

That's super weird! My own Mac is running macOS 12.6.1 (English U.K.), and the one with problem is on macOS 13.0 (German Germany), On her system the manpage does not display properly no matter I name the file as the script name or script_name.1

Both Linux, older macOS and linux as windows subsystem can display the man page with no problem.

She doesn't have experience with shell and I believe she only ran some auto script (and from official source) for installing docker + python3 + git.

Nov 14, 2022 8:49 AM in response to jimmymcheung

jimmymcheung wrote:

She doesn't have experience with shell and I believe she only ran some auto script (and from official source) for installing docker + python3 + git.

I'm sure that's the cause of the problem. And I'm sure it doesn't end there. Pretty much every set of instructions for the Mac that you'll find on the internet involves installing something like Homebrew. In theory, Homebrew is a Linux-style package manage for the Mac. In practice, its instant corruption of the command line environment. Usually this is done by people who don't know how any of this works. So when their environment get scrambled, they are helpless to fix it. Welcome to our world. 😄

man does not work properly in macOS 13 than older macOS

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.