加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

linux – 人们如何找到git的子命令联机帮助页?

发布时间:2020-12-13 19:51:45 所属栏目:Linux 来源:网络整理
导读:在我的 linux系统上,我可以做“man git log”(注意空格),这将显示git-log(1)(带破折号)的联机帮助页,如预期的那样. 在我的MacOSX机器上,“man git log”仅显示git(1)的手册页. linux的人怎么知道两个参数“git”和“log”应该结合起来找到“git-log”联机帮
在我的 linux系统上,我可以做“man git log”(注意空格),这将显示git-log(1)(带破折号)的联机帮助页,如预期的那样.

在我的MacOSX机器上,“man git log”仅显示git(1)的手册页.

linux的人怎么知道两个参数“git”和“log”应该结合起来找到“git-log”联机帮助页?如何在OSX中获得相同的结果?

解决方法

这是许多 Linux系统上使用的 particular implementation of man的一个功能.参考 documentation(对于man),在-no-subpages选项的描述中提到:

--no-subpages

By default,man will try to interpret pairs of manual page
names given on the command line as equivalent to a single
manual page name containing a hyphen or an underscore. This
supports the common pattern of programs that implement a
number of subcommands,allowing them to provide manual pages
for each that can be accessed using similar syntax as would be
used to invoke the subcommands themselves.

人的其他实现可以做不同的事情.例如(不好documented,但如果你研究它),快速检查OSX上的man git状态El Capitan显示它试图找到状态的手册页.但是,man git-status提供了一个手册页.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读