MCPcopy
hub / github.com/spf13/cobra / genZshCompletion

Method genZshCompletion

zsh_completions.go:80–85  ·  view source on GitHub ↗
(w io.Writer, includeDesc bool)

Source from the content-addressed store, hash-verified

78}
79
80func (c *Command) genZshCompletion(w io.Writer, includeDesc bool) error {
81 buf := new(bytes.Buffer)
82 genZshComp(buf, c.Name(), includeDesc)
83 _, err := buf.WriteTo(w)
84 return err
85}
86
87func genZshComp(buf io.StringWriter, name string, includeDesc bool) {
88 compCmd := ShellCompRequestCmd

Callers 3

GenZshCompletionMethod · 0.95
genZshCompletionFileMethod · 0.95

Calls 2

NameMethod · 0.95
genZshCompFunction · 0.85

Tested by

no test coverage detected