diff --git a/cli/command/image/history.go b/cli/command/image/history.go index e52243c3ff2f..d55f1635a319 100644 --- a/cli/command/image/history.go +++ b/cli/command/image/history.go @@ -51,6 +51,7 @@ func NewHistoryCommand(dockerCli command.Cli) *cobra.Command { flags.StringVar(&opts.platform, "platform", "", `Show history for the given platform. Formatted as "os[/arch[/variant]]" (e.g., "linux/amd64")`) _ = flags.SetAnnotation("platform", "version", []string{"1.48"}) + _ = cmd.RegisterFlagCompletionFunc("platform", completion.Platforms) return cmd }