Last active
August 14, 2023 15:20
-
-
Save kconner/e8b730103607e0f496275a1c185333ec to your computer and use it in GitHub Desktop.
manx [section] <page>: Creates and opens a PDF for a manpage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tested on macOS 13. | |
function manx { | |
if [ "$1" = "" ]; then | |
echo "manx [section] <page>: Creates and opens a PDF for a manpage." | |
else | |
pdfpath="/tmp/$*.man.pdf" | |
man -t $* | pstopdf -o "$pdfpath"; open "$pdfpath" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment