Reputation: 1155
I am interested in learning how to read the command-line syntax on Git Man pages. For instance, the following appears in the synopsis of this page
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>]
Can someone please offer an explanation or resource as to how to read this syntax? A Google search brings up results for Windows and IBM syntax, but I can't find anything about Linux-type commands.
Upvotes: 0
Views: 274
Reputation: 5373
|
) make the things in brackets mutually exclusive-
or a --
are placeholders for things like filenames, etc.(from 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.
Upvotes: 2