mirror of
https://github.com/spf13/cobra
synced 2024-12-26 22:37:08 +00:00
Document option to hide the default completion cmd (#1779)
Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com> Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com>
This commit is contained in:
parent
459fc5fce3
commit
a281c8b47b
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue