

Man -t "$" 2>/dev/null | /usr/local/bin/ps2pdf - | open -f -a Preview.app With Ghostscript installed, my slightly more complicated (though still one line) function now looks like this: # Open man pages in Preview The package contains a number of tools for working with PostScript the one of interest to me is ps2pdf, which does what you might guess: Converts PostScript files to PDF files. I've tested it, and it works well-it's the solution I'm using, in fact, because it's much faster than my solution.īefore I found the above-linked page, I found a solution that relies on Ghostscript, which I installed it via Homebrew ( brew install ghostscript). Mandoc -T pdf "$(/usr/bin/man -w )" | open -fa PreviewĪrmin Briegel posted the above solution on his blog, Scripting OS X.

The replacement function for my old pman command looks like this: function pman() There are two solutions for this, one that relies on an external package (which is the solution I found), and another using only macOS' built-in tools (which I found just after finishing this writeup). profile file, was very simple: # Open man pages in Previewīut this now fails because Preview won't parse the PostScript file. This function opens the specified command's man page in Preview, nicely formatted using PostScript. Whatever the reason, this change broke one of my most-used Terminal functions: Apple hasn't explained why they've made this change, but many think it's due to possible security issues with PostScript files.

One major change in macOS Ventura is that Preview can no longer display PostScript files.
