Skip to content

Commit

Permalink
Boolean flags by presence (#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
sixolet authored and knative-prow-robot committed Jul 27, 2019
1 parent 7d1594d commit 34f123c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions conventions/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ In this case `foo` is positional, and refers to the service to create.
example, `--image=img.repo/asdf` in Knative Serving sets
`spec.template.containers[0].image`

* Flags that control a boolean behavior (eg. generate a name or not) are
specified by their presence. The default happens when the flag is not present,
and adding the flag marks the user's desire for the non-default thing. When
the flag *disables* a default behavior which is to do something, it should
start with `no` (eg. `--no-generate-name` when the default is to generate a
name).

#### Output

Commands that output information should support `--output` with a shorthand of
Expand Down

0 comments on commit 34f123c

Please sign in to comment.