Skip to content

Commit

Permalink
Document option to hide the default completion cmd (#1779)
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Khouzam <[email protected]>

Signed-off-by: Marc Khouzam <[email protected]>
  • Loading branch information
marckhouzam authored Sep 16, 2022
1 parent 459fc5f commit a281c8b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions shell_completions.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ To tell Cobra *not* to provide the default `completion` command:
rootCmd.CompletionOptions.DisableDefaultCmd = true
```

To tell Cobra to mark the default `completion` command as *hidden*:
```
rootCmd.CompletionOptions.HiddenDefaultCmd = true
```

To tell Cobra *not* to provide the user with the `--no-descriptions` flag to the completion sub-commands:
```
rootCmd.CompletionOptions.DisableNoDescFlag = true
Expand Down

0 comments on commit a281c8b

Please sign in to comment.