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

Method genZshCompletionFile

zsh_completions.go:70–78  ·  view source on GitHub ↗
(filename string, includeDesc bool)

Source from the content-addressed store, hash-verified

68}
69
70func (c *Command) genZshCompletionFile(filename string, includeDesc bool) error {
71 outFile, err := os.Create(filename)
72 if err != nil {
73 return err
74 }
75 defer outFile.Close()
76
77 return c.genZshCompletion(outFile, includeDesc)
78}
79
80func (c *Command) genZshCompletion(w io.Writer, includeDesc bool) error {
81 buf := new(bytes.Buffer)

Callers 2

GenZshCompletionFileMethod · 0.95

Calls 1

genZshCompletionMethod · 0.95

Tested by

no test coverage detected