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

Function printCommandSuggestions

help.go:187–198  ·  view source on GitHub ↗
(commands []*Command, writer io.Writer)

Source from the content-addressed store, hash-verified

185var DefaultAppComplete = DefaultRootCommandComplete
186
187func printCommandSuggestions(commands []*Command, writer io.Writer) {
188 for _, command := range commands {
189 if command.Hidden {
190 continue
191 }
192 if len(command.Usage) > 0 {
193 _, _ = fmt.Fprintf(writer, "%s:%s\n", command.Name, command.Usage)
194 } else {
195 _, _ = fmt.Fprintf(writer, "%s\n", command.Name)
196 }
197 }
198}
199
200func cliArgContains(flagName string, args []string) bool {
201 for _, name := range strings.Split(flagName, ",") {

Callers 1

DefaultCompleteWithFlagsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…