MCPcopy
hub / github.com/containers/toolbox / completionCommands

Function completionCommands

src/cmd/completion.go:61–72  ·  view source on GitHub ↗
(cmd *cobra.Command, _ []string, _ string)

Source from the content-addressed store, hash-verified

59}
60
61func completionCommands(cmd *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {
62 commandNames := []string{}
63 commands := cmd.Root().Commands()
64 for _, command := range commands {
65 if strings.Contains(command.Name(), "complet") {
66 continue
67 }
68 commandNames = append(commandNames, command.Name())
69 }
70
71 return commandNames, cobra.ShellCompDirectiveNoFileComp
72}
73
74func completionContainerNames(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {
75 var containerNames []string

Callers

nothing calls this directly

Calls 1

NameMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…