MCPcopy Index your code
hub / github.com/docker/cli / completeContextNames

Function completeContextNames

cmd/docker/completions.go:12–17  ·  view source on GitHub ↗
(dockerCLI contextStoreProvider)

Source from the content-addressed store, hash-verified

10}
11
12func completeContextNames(dockerCLI contextStoreProvider) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) {
13 return func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) {
14 names, _ := store.Names(dockerCLI.ContextStore())
15 return names, cobra.ShellCompDirectiveNoFileComp
16 }
17}
18
19var logLevels = []string{"debug", "info", "warn", "error", "fatal", "panic"}
20

Callers 2

TestCompleteContextNamesFunction · 0.70
newDockerCommandFunction · 0.70

Calls 2

NamesMethod · 0.80
ContextStoreMethod · 0.65

Tested by 1

TestCompleteContextNamesFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…