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

Function commandAncestry

fish.go:204–217  ·  fish.go::commandAncestry
(command *Command)

Source from the content-addressed store, hash-verified

202}
203
204func commandAncestry(command *Command) string {
205 var ancestry []string
206 ancestors := command.Lineage()
207 for i := len(ancestors) - 2; i >= 0; i-- {
208 ancestry = append(
209 ancestry,
210 fmt.Sprintf(
211 "__fish_seen_subcommand_from %s",
212 strings.Join(ancestors[i].Names(), " "),
213 ),
214 )
215 }
216 return strings.Join(ancestry, "; and ")
217}
218
219func escapeSingleQuotes(input string) string {
220 return strings.ReplaceAll(input, `'`, `\'`)

Callers 2

fishSubcommandHelperFunction · 0.85
fishFlagHelperFunction · 0.85

Calls 2

LineageMethod · 0.80
NamesMethod · 0.65

Tested by

no test coverage detected