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

Method GenBashCompletionFileV2

bash_completionsV2.go:470–478  ·  view source on GitHub ↗

GenBashCompletionFileV2 generates Bash completion version 2.

(filename string, includeDesc bool)

Source from the content-addressed store, hash-verified

468
469// GenBashCompletionFileV2 generates Bash completion version 2.
470func (c *Command) GenBashCompletionFileV2(filename string, includeDesc bool) error {
471 outFile, err := os.Create(filename)
472 if err != nil {
473 return err
474 }
475 defer outFile.Close()
476
477 return c.GenBashCompletionV2(outFile, includeDesc)
478}
479
480// GenBashCompletionV2 generates Bash completion file version 2
481// and writes it to the passed writer.

Callers

nothing calls this directly

Calls 1

GenBashCompletionV2Method · 0.95

Tested by

no test coverage detected