Files
docker-cli/cli/command/plugin/set.go
Sebastiaan van Stijn 467fcfe4bd cli/command/plugin: add completion for plugin subcommands
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-10 11:49:16 +02:00

21 lines
615 B
Go

package plugin
import (
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/spf13/cobra"
)
func newSetCommand(dockerCLI command.Cli) *cobra.Command {
return &cobra.Command{
Use: "set PLUGIN KEY=VALUE [KEY=VALUE...]",
Short: "Change settings for a plugin",
Args: cli.RequiresMinArgs(2),
RunE: func(cmd *cobra.Command, args []string) error {
return dockerCLI.Client().PluginSet(cmd.Context(), args[0], args[1:])
},
ValidArgsFunction: completeNames(dockerCLI, stateAny), // TODO(thaJeztah): should only complete for the first arg
DisableFlagsInUseLine: true,
}
}