Last active
January 3, 2016 06:39
-
-
Save juandesant/8424548 to your computer and use it in GitHub Desktop.
Inspired by `pman`, `sman` in Ask Different:
http://apple.stackexchange.com/posts/5461/revisions
This file contains 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
# Bash function (Mac OS X specific) for getting man pages | |
# in PDF visualized in Preview.app | |
# Tryit with `pdfman man`, `pdfman curl`, or `pdfman bash`, for instance. | |
pdfman() { | |
outname=/tmp/man-"$1".ps | |
man -t $1 > $outname # get PS version of man page in /tmp | |
if [ -s $outname ] | |
then { | |
open -a Preview $outname | |
} | |
fi | |
} | |
# similar command, to open clean manpage in TextMate | |
mateman() { man "${1}" | col -b | mate; }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment