cli/docs/command-line-syntax.md
2020-05-04 11:57:05 -07:00

755 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 text that a user must supply

example: gh pr view <issueNumber> Replace <issueNumber> 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 … >