Skip to content

Commit

Permalink
Document option to hide the default completion cmd
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com>
  • Loading branch information
marckhouzam committed Aug 30, 2022
1 parent 7045405 commit abaa162
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 abaa162

Please sign in to comment.