func (c *Command) genBashCompletion(w io.Writer, includeDesc bool) error { … } func genBashComp(buf io.StringWriter, name string, includeDesc bool) { … } // GenBashCompletionFileV2 generates Bash completion version 2. func (c *Command) GenBashCompletionFileV2(filename string, includeDesc bool) error { … } // GenBashCompletionV2 generates Bash completion file version 2 // and writes it to the passed writer. func (c *Command) GenBashCompletionV2(w io.Writer, includeDesc bool) error { … }