mirror of https://github.com/knative/docs.git
Add entry for flag documentation (#4403)
* Add entry for flag documentation fixes #4077 * Update docs/help/contributor/style-guide/documenting-code.md Co-authored-by: Samia Nneji <snneji@vmware.com> Co-authored-by: Samia Nneji <snneji@vmware.com>
This commit is contained in:
parent
cd34b3eb77
commit
634b285393
|
|
@ -258,3 +258,16 @@ Apply code formatting only to special-purpose text:
|
||||||
<some-code>
|
<some-code>
|
||||||
```
|
```
|
||||||
````
|
````
|
||||||
|
|
||||||
|
|
||||||
|
## Documentation of flags
|
||||||
|
> Always use the short version of flags used in a command rather than the extended version. For example, use `-n` rather than `--namespace`.
|
||||||
|
=== ":white_check_mark: Correct"
|
||||||
|
```bash
|
||||||
|
kubectl apply -f <filename>.yaml -n <namespace>
|
||||||
|
```
|
||||||
|
|
||||||
|
=== ":no_entry: Incorrect"
|
||||||
|
```bash
|
||||||
|
kubectl apply --filename <filename>.yaml --namespace <namespace>
|
||||||
|
```
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue