Mac Os X Man Pages




Yet another way to read beautifully formatted man pages | 21 comments | Create New Account

Pages Mac free download - Technitium MAC Address Changer, Winamp for Mac, Mac Video Downloader, and many more programs. OS X Mavericks is the latest release of the world's most advanced desktop. Appleā€™s man pages are useful because a popup menu near the top of the page lets you choose an OS X version, so if you need to see the man page for an older version of OS X, you can do so.

Click here to return to the 'Yet another way to read beautifully formatted man pages' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Yet another way to read beautifully formatted man pages
This is nice, but it does assume that you are always connected to the net, and it does take a moment or two for the webpage to load.

Personally, I like to use the following. The output is in plain text rather than a pretty webpage, but it is instantaneous, requires no network connection, and gives you all the functions and convenience of TextEdit (or whatever other text editor you choose to use) while working with man pages.

Just add the following lines to .profile (or .bash_profile or whatever applies to your situation) in your home folder.

Yet another way to read beautifully formatted man pages

For those of who like to use vim:
vman()
{
man '${1}' | col -bx | view -
}

Yet another way to read beautifully formatted man pages

Actually, if you're using vim, put this into your .vimrc:

and then, from inside vim, you can type ':Man whatever' (yes, the M must be uppercase) to get nice syntax-colored (you do have syntax on in your .vimrc, right?) man pages in a split window inside vim. Great for referring to documentation while writing scripts.

Oh, and if you haven't checked out a recent version of MacVim, definitely give it a whirl -- it's awesome (best version of the best text editor ever, and it's free).

Yet another way to read beautifully formatted man pages

This is what I settled on using MacVim:
function tman {
man '${1}' | col -b | /usr/local/bin/gview - 1>/dev/null 2>&1
}

Yet another way to read beautifully formatted man pages

Thanks for your suggestion -- you're right about the speed, and of course yours works offine. I added that too and now I have both.

Yet another way to read beautifully formatted man pages

To support the non-numeric man sections, such as 'n' (for Tcl commands), change your regex to:
.*(${1}.)([[:alnum:]]).*$

Yet another way to read beautifully formatted man pages
Yet another way to read beautifully formatted man pages
An alternative is to put man.pl into the cgi-bin of a local server and add All 1 2 3 4 5 6 7 8 9 n to your local home page.

Mac Os X Sed Man Page

Yet another way to read beautifully formatted man pages

There are also some excellent man page reading apps out there, but they require launching and browsing a list.
Not necessarily. Using Bwana I can just type 'open man:gethostbyname' and instantly see the output in my web browser. It also has searching capabilities. If I'm already in the browser, I can just type 'man:gethostbyname' in the address field.
The only problem with Bwana I've found is that if you click on a man link from within Xcode documentation, it opens the man page in Xcode documentation, but also tries to open it in Bwana, but fails. It is annoying but not too big a deal since, while in X code documentation, I typically don't need to lookup man pages.

Yet another way to read beautifully formatted man pages

I like bwana too, because I use Firefox and search by typing. Very fast. From there you can print the PDF. It generates an index, which I've bookmarked.

Pages
Yet another way to read beautifully formatted man pages

I've always used the following, in this case for 'dscl', without the %:
% man -t dscl | pstopdf -i -o ~/Desktop/dscl.pdf

Mac Os X Man Pages File

Yet another way to read beautifully formatted man pages

It should be noted that this hint does not display the man pages content stored on your hard drive, therefore it may not display the correct man page for the version of the app that is installed on your computer. For example, if you've installed a more recent version of rsync, this hint will load Apple's rsync man page which describes the behavior of the version of rsync included in Mac OS X, and that may have different options than the one you're running locally.

Man
Yet another way to read beautifully formatted man pages
I use bwana and this it opens the man page in my browser
Yet another way to read beautifully formatted man pages

as pointed out in the comments on the PDF hint - the key to making this a great option is to cache the PDFs - they then open instantly after a one time conversion.
Will work when your offline - while this one won't
-P

Yet another way to read beautifully formatted man pages

Looks like I'm the only one still using good old 'man'. :)
Type '/word' to search for 'word', press N to go to the next hint and navigate with vim-like controls (F, B, J, K, g, G), that's all I need. :)
---
this is not the sig you`re looking for.

Yet another way to read beautifully formatted man pages

I use an AppleScript to accomplish this (using pstopdf -> Preview) but in addition to the lookup, for a quicker response next time, I store the results of each unique man page in a folder in ~/Documents. My script then checks that folder first for the term entered and does a man -t lookup of the term only if it's not already on file.

Yet another way to read beautifully formatted man pages
And if we need any more evidence that there is more than one way to do things, here's what I have in my .bashrc:
Mac function niceman { man -t $@ | open -f -a Preview.app; }
Location This makes man output PostScript and Preview will convert it to a PDF. On large man pages it may take a few seconds, but on small ones it's nice and quick. All the formatting comes through looking very good.
As an example, I timed 'niceman bash' from the time I hit enter to the time I saw the PDF open in Preview - it took around 5 seconds to generate a 64-page PDF.

---
k:.

Yet another way to read beautifully formatted man pages

Mac Os X Man Pages Free

Yet another way to read beautifully formatted man pages

My thoughts exactly. In the Terminal it's just 'manopen zsh' to open the corresponding formatted and linked man page. And you can leave it open while crafting your command-line.
Try it and see, if you don't like it then go back to the ugly Times-Roman uselessly-paginated non-hyperlinked PDF files.
---
Madness takes its toll.
Please have exact change.

Macos Install Man Pages

The wealth of information on this forum is fantastic.

Pages

Mac Os X Disable Man Page

Yet another way to read beautifully formatted man pages

Mac Os X Man Pages

As has been commented, this won't work when not online, but it also wont work for non Apple hosted man pages, such as those from MacPorts or Fink or anything else. Combining the ideas from the various other hints, here is a function I came up with to do it locally for any man page: I know I call man -w twice, but that's to avoid any temporary variables - YMMV.




Comments are closed.