Skip to content
Myr

Document option to hide the default completion cmd (#1779)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com>

authored by Marc Khouzam · committed by GitHub · parent 459fc5f · Browse files · 1 file+5 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com>

Diff stats

1 file+5 added−0 removed

  • other:+5 added−0 removed

1 file+5 added−0 removed

modified:shell_completions.md+5 added
97 unmodified lines
98```99rootCmd.CompletionOptions.DisableDefaultCmd = true100```101102To tell Cobra to mark the default `completion` command as *hidden*:103```104rootCmd.CompletionOptions.HiddenDefaultCmd = true105```106107To tell Cobra *not* to provide the user with the `--no-descriptions` flag to the completion sub-commands:108```109rootCmd.CompletionOptions.DisableNoDescFlag = true110```
443 unmodified lines