Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Snippet

Snippet creates a completion script for the given shell.

For single completers, produces a standard single-command snippet. For multi-completers, produces a multi-completer snippet that registers all subcommand completers at once.

snippet, err := carapace.Gen(rootCmd).Snippet("bash")

Custom shell code can be injected via WithSnippetFuncs.