Man; I wish I knew this many years ago

man is a handy terminal command for looking up how to use other bits of macOS Unix subsystems

Usually though I end up opening 2 terminal since man pipes its output through a pager - which is handy and to at the same time
It means you CAN scroll forwards & backwards but you can have the command docs and type at the same time
One you end the output its no longer on screen

So a recent question prompted me to go peek at how to use man better

And I found pman
A command you can add to your shell and it pops up Preview with a nice formatted document
The entire command is


and of course you an add it to zsh by opening .zshrc
edit the file and add

pman() {
    man -t $@ | open -f -a Preview

now you can type

pman ls

and get this


nice but does not work anymore with ventura as preview does not open ps files anymore … :frowning:

edit: you can use Skim to open and convert ps files on ventura.

Well this all stemmed from a long conversation Norman and I had the other day while I was trying to figure out how to do this

This still has a bit more work to do on it.

So if anyone has “feature ideas” let me know :slight_smile:

FYI… 100% Swift


Sucks for people on Ventua
I’m not so doesnt impact me but eventually will

man, and its support programs, do support other output forms like html

@JeanYves you can use the ‘pstopdf’ command line tool to convert postScript format files to PDF’s.
And then you can open the created PDF document with the ‘’.

This is an example based on Normans script, but made as an AppleScript.

set toolName to "ls"
set manPDFPath to "/tmp/" & toolName & ".pdf"
set manPDFFile to do shell script ("man -t " & toolName & " | pstopdf -i -o " & manPDFPath)
delay (1.0)
set openManPDFFile to do shell script "open " & manPDFPath & " -a Preview"

Regards Mark

1 Like

This post was flagged by the community and is temporarily hidden.

@MonkeybreadSoftware Norman’s forum post was about easily accessing the man pages of a command line tools.
As far as I can tell, it has nothing to do with using Xojo.
So why would anyone consider paying for irrelevant and unnecessary plugins ?
When there is a free readily available tool built into the operating system.


This is just my hint, that if Norman likes to automate this with a Xojo app to convert the Postscript from man page output to PDF, he can use the plugin.

And if Dave wants to do the same in his app, he can check CGPSConverter functions in CoreGraphics framework, which should also be useable in Swift.

1 Like

@MonkeybreadSoftware Norman was sharing his method using a shell script, to open man pages as a PDF in Preview.
A Xojo automation project was never mentioned or implied.
Dave like myself codes in Swift for Apple platforms, and like myself thinks Xojo sucks.
And his project as shown was being written in Swift, so sgain no Xojo needed there either.
So it seems to me like your simply hijacking this thread to flog your irrelevant plugins.

The Preview thing won’t work anymore with MacOS Ventura. Did you miss that?

So at least this script needs a tool like ps2pdf to run there.

A bit of ghostscript and you can view it there is no plugin needed and no Money to do that on Ventura

Is for free of charge the plugin is not


@MonkeybreadSoftware I’m not on Ventura, I was simply trying to show a free easy way of converting Postscript files to PDF’s.
And unlike you, I’m not looking to fleece people of there money, for any help I offer on forums.
And if I where on Ventura, I would still find a free native way to do it, without nonsense plugins.
So my point here is, your irrelevant plugins are not needed for anything related to this thread.


Since we are talking about MAN and Ventura…

I found out today after conversations with @HalGumbert (who is running Ventura)
that Apple has drastically changed the CLI arguments for the MAN command.
Luckily we found an easy alternative so my app can move forward

The “man -wK” doesn’t work and you need to use “manpath” instead. And I’m sure that is not the ONLY change Apple made.


That’s even better than my Solution, thanks for that. Nothing needed all is onboard. #macisbest

I’m using just the cmd line - no Xojo involved
The app I AM writing that I needed to poke around the cmd line is in C#

Daves using Swift

No Xojo involved in either project


pstopdf should suffice

and should work on Catalina Monterey Big Str & Ventura

not sure if it will require an actual file or not as that seems to be what pstopdf does

Yeah the ‘pstopdf’ shell script does work on Catalina Big Sur and Monterey.
Dave said that the man command line tool has changed on Ventura, but I’m sure there is a way to create a similar shell script to do the same thing on Ventura.
But until I upgrade to Ventura, I can’t speculate how the shell script would need to change.

Regards Mark

This conversation has been investigating what file formats I will be able to get my app to export to.
but that is a few steps down on my punch list.

1 Like

@npalardy according to this article.

you may be able to change your original script to work on Ventura as well as the earlier MacOS’s

I have changed my AppleScript to this.

set toolName to "ls"
set manPDFFile to do shell script "mandoc -T pdf \"$(/usr/bin/man -w " & toolName & ")\" | open -fa Preview"

which works on my Monterey partition.
But I don’t have Ventura to test if the code works.

1 Like

Which part of

“Or use CGPSConverter via declares if you prefer.” and “he can check CGPSConverter functions in CoreGraphics framework”

did you not understand?