mirror of
https://github.com/spf13/cobra
synced 2024-11-05 05:17:12 +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
|
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:
|
To tell Cobra *not* to provide the user with the `--no-descriptions` flag to the completion sub-commands:
|
||||||
```
|
```
|
||||||
rootCmd.CompletionOptions.DisableNoDescFlag = true
|
rootCmd.CompletionOptions.DisableNoDescFlag = true
|
||||||
|
|
Loading…
Reference in a new issue