Placeholders are spelled in lowercase and enclosed in angle brackets:
-
If a placeholder has multiple words, they are separated by dashes:
```bash <new-branch-name> --template=<template-directory> ```
Possibility of multiple occurrences is indicated by three dots:
Optional parts are enclosed in square brackets:
Multiple alternatives are indicated with vertical bars:
-
Use spacing around ”|” token(s), but not immediately after opening or before closing a [] or () pair:
- Do:
[-q | --quiet]
- Don’t:
[-q|--quiet]
- Do:
-
Don’t use spacing around ”|” tokens when they’re used to separate the alternate arguments of an option:
- Do:
--track[=(direct|inherit)]
- Don’t:
--track[=(direct | inherit)]
- Do:
Parentheses are used for grouping:
-
- (Any number of either
<rev>
or<range>
. Parens are needed to make it clear that ”…” pertains to both<rev>
and<range>
.)
- (Any number of either
-
``` bash [(-p <parent>)...]
- (Any number of option -p, each with one `<parent>` argument.)
-
- (One and only one of "`-a`", "`-d`" or "`<branch>`" _must_ (no square brackets) be provided.)
- And a somewhat more contrived example:
--diff-filter=[(A|C|D|M|R|T|U|X|B)...[*]]
- Here "=" is outside the brackets, because "--diff-filter=" is a valid usage. "*" has its own pair of brackets, because it can (optionally) be specified only when one or more of the letters is also provided.