我有兴趣学习如何在Git Man页面上阅读命令行语法。例如,以下内容出现在this页面
的概要中git [--version] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p|--paginate|--no-pager] [--no-replace-objects]
[--bare] [--git-dir=<path>] [--work-tree=<path>]
[-c <name>=<value>]
[--help] <command> [<args>]
有人可以提供有关如何阅读此语法的说明或资源吗? Google搜索会显示Windows和IBM语法的结果,但我找不到任何有关Linux类型命令的信息。
答案 0 :(得分:1)
|
)使括号内的东西互相排斥-
或--
开头的字词是文件名等内容的占位符。(来自man-pages(7))
SYNOPSIS briefly describes the command or function's interface.
For commands, this shows the syntax of the command and
its arguments (including options); boldface is used for
as-is text and italics are used to indicate replaceable
arguments. Brackets ([]) surround optional arguments,
vertical bars (|) separate choices, and ellipses (...)
can be repeated. For functions, it shows any required
data declarations or #include directives, followed by
the function declaration.