fix(cmd) have history use global output flag

Also, it seems that for helm v3, the description of flags all start
with a lowercase, so this commit also does that for the output flag.

Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
pull/6563/head
Marc Khouzam 5 years ago
parent 5c592dcca6
commit cb86db7ff5

@ -53,5 +53,5 @@ func bindOutputFlag(cmd *cobra.Command, varRef *string) {
// NOTE(taylor): A possible refactor here is that we can implement all the
// validation for the OutputFormat type here so we don't have to do the
// parsing and checking in the command
cmd.Flags().StringVarP(varRef, outputFlag, "o", string(action.Table), fmt.Sprintf("Prints the output in the specified format. Allowed values: %s, %s, %s", action.Table, action.JSON, action.YAML))
cmd.Flags().StringVarP(varRef, outputFlag, "o", string(action.Table), fmt.Sprintf("prints the output in the specified format. Allowed values: %s, %s, %s", action.Table, action.JSON, action.YAML))
}

@ -73,8 +73,8 @@ func newHistoryCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
}
f := cmd.Flags()
f.StringVarP(&client.OutputFormat, "output", "o", action.Table.String(), "prints the output in the specified format (json|table|yaml)")
f.IntVar(&client.Max, "max", 256, "maximum number of revision to include in history")
bindOutputFlag(cmd, &client.OutputFormat)
return cmd
}

Loading…
Cancel
Save