4 ms·
For those on Linux you can do this with: f=$(mktemp);man -t "$@" > "$f" && ( {some-pdf-viewer} "$f" ; rm "$f" ) ... replacing '{some-pdf-viewer}' with whateve
by nocman 6y ago
For those on Linux you can do this with:
f=$(mktemp);man -t "$@" > "$f" && ( {some-pdf-viewer} "$f" ; rm "$f" )
... replacing '{some-pdf-viewer}' with whatever PDF viewer works for you. There is probably one that will take the document on stdin, but I am not aware of one.
I realize I'm late to the party here, but thought is was worth posting anyway. (edited for typo)
- dTal 6y agoWith BSD man (default on Void Linux) you can do: MANPAGER=<some-pdf-viewer> man -T pdf <command>
- solatic 6y agoYou should be able to avoid using mktemp by: pman='some-pdf-viewer <(man -t "$@")'
- solatic 6y agoApparently not possible for PDFs, see https://superuser.com/questions/1243405/using-process-substitution-or-similar-to-display-man-pages-as-pdf-w-o-tempfile https://superuser.com/questions/1243405/using-process-substi... . TIL