GenFishCompletion generates fish completion file and writes to the passed writer.
(w io.Writer, includeDesc bool)
| 274 | |
| 275 | // GenFishCompletion generates fish completion file and writes to the passed writer. |
| 276 | func (c *Command) GenFishCompletion(w io.Writer, includeDesc bool) error { |
| 277 | buf := new(bytes.Buffer) |
| 278 | genFishComp(buf, c.Name(), includeDesc) |
| 279 | _, err := buf.WriteTo(w) |
| 280 | return err |
| 281 | } |
| 282 | |
| 283 | // GenFishCompletionFile generates fish completion file. |
| 284 | func (c *Command) GenFishCompletionFile(filename string, includeDesc bool) error { |