tags:

views:

156

answers:

3

My Leopard has no manuals for Wget and compinit, for example. It lacks in many other areas such as in examples and documentation about options too.

Ubuntu has often better manuals than Mac: for instance, it has manuals for the two commands.

A solution to the problem may be to make a port to MacPorts which installs Ubuntu's manuals to Mac. However, I am not sure whether it is the best solution or not.

Perhaps, a PATH which man uses could be simply changed, such that you keep a local copy of Ubuntu's manuals in Mac. However, I am not sure how you can do that.

How can you expand Mac's manuals to have at least Ubuntu's manuals, such that I can use the following commnands

man wget
man compinit
+5  A: 

Original Post: You might want to start by installing said programs on your Mac. The installation will probably include the man pages.

Update to reflect discussion: MacPorts stores its man pages in /opt/local/share/man and adds these to the $MANPATH, apparently only for bash. Make sure it is also on your man path for zsh or whatever other shell you use.

compinit seems to be documented in zshcompsys(1).

Jeremy Huiskamp
@Jeremy: I installed wget by MacPorts. It has no manuals. Mac has by default the command compinit, which has no manuals.
Masi
What is your $MANPATH? MacPorts puts its manpages in /opt/local/share/man and adds a line to your .bash_profile to add this location to your $MANPATH. I'd suggest making sure it's on your path and that the man page is in that directory. If it's not, try submitting a bug report to MacPorts.
Jeremy Huiskamp
As for compinit, I'm guessing this is something to do with zsh? Try typing `type compinit` to see whether it's a built-in or an executable or what. If it's built-in, it should theoretically be documented in `man zsh`. Also, if you're using zsh, that might explain /opt/local/share/man not being on your $MANPATH.
Jeremy Huiskamp
Ubuntu's online man pages do not have compinit. However there is a section in the zshcompsys(1) page on compinit. Same goes for Leopard.
Jeremy Huiskamp
MacPort's `wget` port _does_ installed a man page. Make sure `/opt/local/share/man` is in your `$MANPATH`, as Jeremy suggested.
mipadi
+1  A: 

Solution to get Wget's manual working. Thanks to blb at MacPorts IRC!

Run the following

unset MANPATH

Do NOT export your old MANPATH after the command.

This made me Wget's manual work.

Masi
+3  A: 

As the other answers imply, you really should understand how PATH and MANPATH work.

OS X's manual pages are often lacking, but only for Mac-specific commands. For the standard *nix commands, OS X carries the proper manual pages. It would be a mistake, for instance, to use Ubuntu's manual page for chmod as a guide to OS X's /bin/chmod, because then you would miss the discussion on setting ACLs via chmod in OS X.

As others have mentioned, Macports stores its man pages in /opt/local/share/man. The MANPATH environment variable should contain this value, but it should either prepend or append the existing MANPATH, depending on whether the Macports executable directories (/opt/local/bin:/opt/local/sbin) have been prepended or appended to the PATH.

guns
Thank you for your answer! It clarified my confusion about the order of PATHs in MANPATH.
Masi