无法扩展Mac的手册以拥有Ubuntu的手册
例如,我的 Leopard 没有 Wget 和 compinit 的手册。 它缺乏许多其他领域,例如有关选项的示例和文档。
Ubuntu 通常有比 Mac 更好的手册:例如,它有两个命令的手册。
问题的解决方案可能是建立一个到 MacPorts 的端口,将 Ubuntu 的手册安装到 Mac 上。 但是,我不确定这是否是最好的解决方案。
也许,可以简单地更改 man 使用的 PATH,这样您就可以在 Mac 中保留 Ubuntu 手册的本地副本。 但是,我不确定你该如何做到这一点。
如何扩展 Mac 的手册以至少包含 Ubuntu 的手册,以便我可以使用以下命令
man wget
man compinit
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
原帖:
您可能想首先在 Mac 上安装上述程序。 安装可能会包括手册页。
更新以反映讨论:
MacPorts 将其手册页存储在
/opt/local/share/man
中,并将它们添加到$MANPATH
中,显然仅适用于 bash。 确保它也在 zsh 或您使用的任何其他 shell 的 man 路径上。compinit
似乎记录在zshcompsys(1)
中。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 inzshcompsys(1)
.正如其他答案所暗示的那样,您确实应该了解 PATH 和 MANPATH 的工作原理。
OS X 的手册页经常缺失,但仅限于 Mac 特定的命令。 对于标准的 *nix 命令,OS X 带有适当的手册页。 例如,使用 Ubuntu 的 chmod 手册页作为 OS X 的 /bin/chmod 的指南将是一个错误,因为那样你就会错过有关在 OS X 中通过 chmod 设置 ACL 的讨论。
正如其他人提到的,Macports 商店它的手册页位于 /opt/local/share/man 中。 MANPATH 环境变量应包含此值,但它应前置或附加现有 MANPATH,具体取决于 Macports 可执行目录 (/opt/local/bin:/opt/local/sbin) 是否已前置或附加到 PATH 。
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.
Wget 手动工作的解决方案。感谢 MacPorts IRC 上的 blb!
运行以下
命令后,请勿导出旧的 MANPATH。
这让我开始了Wget的手工工作。
Solution to get Wget's manual working. Thanks to blb at MacPorts IRC!
Run the following
Do NOT export your old MANPATH after the command.
This made me Wget's manual work.