910 B
910 B
How we document our command line syntax
Required arguments
Use plain text
example:
gh help
The argument help is required in this command
Placeholder values
Use angled brackets to represent a value the user must supply
example:
gh pr view <issueNumber>
Replace <issue-number> with an issue number
Optional arguments
Place optional arguments in square brackets
example:
gh pr checkout [--web]
The argument --web is optional.
Mutually exclusive arguments
Place mutually exclusive arguments inside braces, separate arguments with vertical bars.
example:
gh pr {view | create}
Repeatable arguements
Ellipsis represent arguments that can appear multiple times
example:
gh pr close <numbers … >
Variable naming
For multi-word variables use dash-case (all lower case with words seperated by dashes)
example:
gh pr checkout <issue-number>