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.
例如,我的Leopard没有Wget和compinit的手册。它缺乏许多其他领域,例如关于选项的示例和文档。
Ubuntu has often better manuals than Mac: for instance, it has manuals for the two commands.
Ubuntu通常比Mac更好的手册:例如,它有两个命令的手册。
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.
该问题的解决方案可能是为MacPorts建立一个端口,将Mac上安装Ubuntu的手册。但是,我不确定它是否是最佳解决方案。
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.
也许,人们使用的PATH可以简单地改变,这样你就可以在Mac上保存Ubuntu手册的本地副本。但是,我不知道你怎么能这样做。
How can you expand Mac's manuals to have at least Ubuntu's manuals, such that I can use the following commnands
你怎么能扩展Mac的手册至少拥有Ubuntu的手册,这样我就可以使用以下的commnands
man wget
man compinit
3 个解决方案
#1
Original Post: You might want to start by installing said programs on your Mac. The installation will probably include the man pages.
原帖:您可能希望首先在Mac上安装所述程序。安装可能包括手册页。
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.
更新以反映讨论:MacPorts将其手册页存储在/ opt / local / share / man中,并将这些手册页添加到$ MANPATH,显然仅用于bash。确保它也在你的man路径上用于zsh或你使用的任何其他shell。
compinit
seems to be documented in zshcompsys(1)
.
compinit似乎记录在zshcompsys(1)中。
#2
As the other answers imply, you really should understand how PATH and MANPATH work.
正如其他答案所暗示的那样,你真的应该理解PATH和MANPATH是如何工作的。
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.
OS X的手册页通常缺乏,但仅适用于特定于Mac的命令。对于标准* nix命令,OS X带有适当的手册页。例如,使用Ubuntu的chmod手册页作为OS X / bin / chmod的指南是错误的,因为那时你会错过在OS X中通过chmod设置ACL的讨论。
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.
正如其他人所提到的,Macports将其手册页存储在/ opt / local / share / man中。 MANPATH环境变量应包含此值,但它应该是前置或附加现有的MANPATH,具体取决于Macports可执行目录(/ opt / local / bin:/ opt / local / sbin)是否已预先添加或附加到PATH 。
#3
Solution to get Wget's manual working. Thanks to blb at MacPorts IRC!
让Wget手动工作的解决方案。感谢MacPorts IRC的blb!
Run the following
运行以下
unset MANPATH
Do NOT export your old MANPATH after the command.
在命令之后不要导出旧的MANPATH。
This made me Wget's manual work.
这让我成为了Wget的手工作品。
#1
Original Post: You might want to start by installing said programs on your Mac. The installation will probably include the man pages.
原帖:您可能希望首先在Mac上安装所述程序。安装可能包括手册页。
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.
更新以反映讨论:MacPorts将其手册页存储在/ opt / local / share / man中,并将这些手册页添加到$ MANPATH,显然仅用于bash。确保它也在你的man路径上用于zsh或你使用的任何其他shell。
compinit
seems to be documented in zshcompsys(1)
.
compinit似乎记录在zshcompsys(1)中。
#2
As the other answers imply, you really should understand how PATH and MANPATH work.
正如其他答案所暗示的那样,你真的应该理解PATH和MANPATH是如何工作的。
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.
OS X的手册页通常缺乏,但仅适用于特定于Mac的命令。对于标准* nix命令,OS X带有适当的手册页。例如,使用Ubuntu的chmod手册页作为OS X / bin / chmod的指南是错误的,因为那时你会错过在OS X中通过chmod设置ACL的讨论。
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.
正如其他人所提到的,Macports将其手册页存储在/ opt / local / share / man中。 MANPATH环境变量应包含此值,但它应该是前置或附加现有的MANPATH,具体取决于Macports可执行目录(/ opt / local / bin:/ opt / local / sbin)是否已预先添加或附加到PATH 。
#3
Solution to get Wget's manual working. Thanks to blb at MacPorts IRC!
让Wget手动工作的解决方案。感谢MacPorts IRC的blb!
Run the following
运行以下
unset MANPATH
Do NOT export your old MANPATH after the command.
在命令之后不要导出旧的MANPATH。
This made me Wget's manual work.
这让我成为了Wget的手工作品。