code: func NewHistoryCommand(dockerCli command.Cli) *cobra.Command {
  	var opts historyOptions
  
  	cmd := &cobra.Command{
  		Use:   "history [OPTIONS] IMAGE",
  		Short: "Show the history of an image",
  		Args:  cli.ExactArgs(1),
  		RunE: func(cmd *cobra.Command, args []string) error {
  			opts.image = args[0]
  			return runHistory(dockerCli, opts)
  		},
  	}
  
  	flags := cmd.Flags()
  
  	flags.BoolVarP(&opts.human, "human", "H", true, "Print sizes and dates in human readable format")
  	flags.BoolVarP(&opts.quiet, "quiet", "q", false, "Only show numeric IDs")
  	flags.BoolVar(&opts.noTrunc, "no-trunc", false, "Don't truncate output")
  	flags.StringVar(&opts.format, "format", "", "Pretty-print images using a Go template")
  
  	return cmd
  }
docs: // NewHistoryCommand creates a new `docker history` command