diff --git a/cmd/helm/flags.go b/cmd/helm/flags.go index b9473a5a7..65575a5c1 100644 --- a/cmd/helm/flags.go +++ b/cmd/helm/flags.go @@ -54,10 +54,9 @@ func addChartPathOptionsFlags(f *pflag.FlagSet, c *action.ChartPathOptions) { // value to the given format pointer func bindOutputFlag(cmd *cobra.Command, varRef *output.Format) { f := cmd.Flags() - f.VarP(newOutputValue(output.Table, varRef), outputFlag, "o", + flag := f.VarPF(newOutputValue(output.Table, varRef), outputFlag, "o", fmt.Sprintf("prints the output in the specified format. Allowed values: %s", strings.Join(output.Formats(), ", "))) - flag := f.Lookup(outputFlag) completion.RegisterFlagCompletionFunc(flag, func(cmd *cobra.Command, args []string, toComplete string) ([]string, completion.BashCompDirective) { var formatNames []string for _, format := range output.Formats() { diff --git a/cmd/helm/root.go b/cmd/helm/root.go index a3e4da746..6ce1dcbf4 100644 --- a/cmd/helm/root.go +++ b/cmd/helm/root.go @@ -117,7 +117,6 @@ func newRootCmd(actionConfig *action.Configuration, out io.Writer, args []string completion.CompDebugln(fmt.Sprintf("About to call kube client for namespaces with timeout of: %d", to)) nsNames := []string{} - // TODO can we request only the namespace with request.prefix? if namespaces, err := client.CoreV1().Namespaces().List(metav1.ListOptions{TimeoutSeconds: &to}); err == nil { for _, ns := range namespaces.Items { if strings.HasPrefix(ns.Name, toComplete) {