Reading man pages with Preview

Reading the man pages in the terminal are really boring, specially using up, down, space, “/” keys.

Using Mac Os X is possible to read the man pages in Preview.

Just put this code into yours .bash_profile / .profile file and be happy :)

pman() { man -t “$@” | open -f -a Preview; }

after restarting the bash, just use the pman command rather the usual man.

Just explaining:

the -t option gets the content of the man page and puts it in the stdout, where will be read by the open and opened in the Preview.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s