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

在我的 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提供了一个手册页.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


查找全部容器的日志文件 $ sudo find /var/lib/docker/containers -name *.log 查看日志位置 $ docker inspect --format='{{.LogPath}}' <container_name> 实时查询内容 $
Linux日志文件中列属性的详细解析
在Linux系统中没有duf命令,如何有效地管理磁盘空间?
深入探讨EncryptPad在Linux操作系统中的功能和优势
原理和应用场景:Linux中ttyload工具的工作原理和实际用途
深度解析SELinux的三种策略类型
评估Linux系统性能的ttyload工具使用效果
分享在Linux系统中检测SSH版本的方法
介绍Linux平台上的数据加密工具EncryptPad
在Linux系统中,如何查看和诊断块设备信息?
在Linux环境下如何查看块设备信息?
探索Linux操作系统下的数据加密工具EncryptPad
学会在Linux系统中查看硬盘信息
分析SELinux:原理与实践
掌握SELinux策略类别
技巧:有效解读和管理Linux日志文件
查看Linux系统中的所有用户
了解Linux系统中各种不同类型的日志文件
深入理解Linux PS命令
方法:在Linux操作系统中查看用户