MCPcopy
hub / github.com/urfave/cli / ToFishCompletion

Method ToFishCompletion

fish.go:13–19  ·  fish.go::Command.ToFishCompletion

ToFishCompletion creates a fish completion string for the `*Command` The function errors if either parsing or writing of the string fails.

()

Source from the content-addressed store, hash-verified

11// ToFishCompletion creates a fish completion string for the `*Command`
12// The function errors if either parsing or writing of the string fails.
13func (cmd *Command) ToFishCompletion() (string, error) {
14 var w bytes.Buffer
15 if err := cmd.writeFishCompletionTemplate(&w); err != nil {
16 return "", err
17 }
18 return w.String(), nil
19}
20
21type fishCommandCompletionTemplate struct {
22 Command *Command

Callers 2

TestFishCompletionFunction · 0.80

Calls 2

StringMethod · 0.45

Tested by 2

TestFishCompletionFunction · 0.64