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

Method genBashCompletion

bash_completionsV2.go:24–29  ·  view source on GitHub ↗
(w io.Writer, includeDesc bool)

Source from the content-addressed store, hash-verified

22)
23
24func (c *Command) genBashCompletion(w io.Writer, includeDesc bool) error {
25 buf := new(bytes.Buffer)
26 genBashComp(buf, c.Name(), includeDesc)
27 _, err := buf.WriteTo(w)
28 return err
29}
30
31func genBashComp(buf io.StringWriter, name string, includeDesc bool) {
32 compCmd := ShellCompRequestCmd

Callers 1

GenBashCompletionV2Method · 0.95

Calls 2

NameMethod · 0.95
genBashCompFunction · 0.85

Tested by

no test coverage detected