MCPcopy Create free account
hub / github.com/docker/docker-agent / completeRunExec

Function completeRunExec

cmd/root/completion.go:15–24  ·  view source on GitHub ↗
(cmd *cobra.Command, args []string, toComplete string)

Source from the content-addressed store, hash-verified

13)
14
15func completeRunExec(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
16 switch len(args) {
17 case 0:
18 return completeAlias(toComplete)
19 case 1:
20 return completeMessage(cmd, args, toComplete)
21 default:
22 return nil, cobra.ShellCompDirectiveNoFileComp
23 }
24}
25
26func completeAlias(toComplete string) ([]string, cobra.ShellCompDirective) {
27 if strings.HasPrefix(toComplete, "/") || strings.HasPrefix(toComplete, ".") {

Callers 1

TestCompleteRunExecFunction · 0.85

Calls 2

completeAliasFunction · 0.85
completeMessageFunction · 0.85

Tested by 1

TestCompleteRunExecFunction · 0.68