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

Function completeLink

cli/command/container/completion.go:179–183  ·  view source on GitHub ↗

completeLink implements shell completion for the `--link` option of `run` and `create`.

(dockerCLI completion.APIClientProvider)

Source from the content-addressed store, hash-verified

177
178// completeLink implements shell completion for the `--link` option of `run` and `create`.
179func completeLink(dockerCLI completion.APIClientProvider) cobra.CompletionFunc {
180 return func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
181 return postfixWith(":", containerNames(dockerCLI, cmd, args, toComplete)), cobra.ShellCompDirectiveNoSpace
182 }
183}
184
185// completeLinks implements shell completion for the `--link` option of `rm --link`.
186//

Callers 1

addCompletionsFunction · 0.85

Calls 2

postfixWithFunction · 0.70
containerNamesFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…