diff --git a/cmd/helm/completion.go b/cmd/helm/completion.go index 68c6a9b59..5e7343069 100644 --- a/cmd/helm/completion.go +++ b/cmd/helm/completion.go @@ -73,11 +73,10 @@ var disableCompDescriptions bool func newCompletionCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ - Use: "completion", - Short: "generate autocompletions script for the specified shell", - Long: completionDesc, - Args: require.NoArgs, - ValidArgsFunction: noCompletions, // Disable file completion + Use: "completion", + Short: "generate autocompletions script for the specified shell", + Long: completionDesc, + Args: require.NoArgs, } bash := &cobra.Command{ diff --git a/cmd/helm/dependency.go b/cmd/helm/dependency.go index 39dfd98ce..2cc4c5045 100644 --- a/cmd/helm/dependency.go +++ b/cmd/helm/dependency.go @@ -84,12 +84,11 @@ This will produce an error if the chart cannot be loaded. func newDependencyCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ - Use: "dependency update|build|list", - Aliases: []string{"dep", "dependencies"}, - Short: "manage a chart's dependencies", - Long: dependencyDesc, - Args: require.NoArgs, - ValidArgsFunction: noCompletions, // Disable file completion + Use: "dependency update|build|list", + Aliases: []string{"dep", "dependencies"}, + Short: "manage a chart's dependencies", + Long: dependencyDesc, + Args: require.NoArgs, } cmd.AddCommand(newDependencyListCmd(out)) diff --git a/cmd/helm/get.go b/cmd/helm/get.go index e94871c7b..7c4854b59 100644 --- a/cmd/helm/get.go +++ b/cmd/helm/get.go @@ -37,11 +37,10 @@ get extended information about the release, including: func newGetCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { cmd := &cobra.Command{ - Use: "get", - Short: "download extended information of a named release", - Long: getHelp, - Args: require.NoArgs, - ValidArgsFunction: noCompletions, // Disable file completion + Use: "get", + Short: "download extended information of a named release", + Long: getHelp, + Args: require.NoArgs, } cmd.AddCommand(newGetAllCmd(cfg, out)) diff --git a/cmd/helm/plugin.go b/cmd/helm/plugin.go index a118a03eb..8e1044f54 100644 --- a/cmd/helm/plugin.go +++ b/cmd/helm/plugin.go @@ -32,10 +32,9 @@ Manage client-side Helm plugins. func newPluginCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ - Use: "plugin", - Short: "install, list, or uninstall Helm plugins", - Long: pluginHelp, - ValidArgsFunction: noCompletions, // Disable file completion + Use: "plugin", + Short: "install, list, or uninstall Helm plugins", + Long: pluginHelp, } cmd.AddCommand( newPluginInstallCmd(out), diff --git a/cmd/helm/repo.go b/cmd/helm/repo.go index 5aac38819..ad6ceaa8f 100644 --- a/cmd/helm/repo.go +++ b/cmd/helm/repo.go @@ -34,11 +34,10 @@ It can be used to add, remove, list, and index chart repositories. func newRepoCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ - Use: "repo add|remove|list|index|update [ARGS]", - Short: "add, list, remove, update, and index chart repositories", - Long: repoHelm, - Args: require.NoArgs, - ValidArgsFunction: noCompletions, // Disable file completion + Use: "repo add|remove|list|index|update [ARGS]", + Short: "add, list, remove, update, and index chart repositories", + Long: repoHelm, + Args: require.NoArgs, } cmd.AddCommand(newRepoAddCmd(out)) diff --git a/cmd/helm/root.go b/cmd/helm/root.go index fced43743..75742ca4a 100644 --- a/cmd/helm/root.go +++ b/cmd/helm/root.go @@ -88,9 +88,6 @@ func newRootCmd(actionConfig *action.Configuration, out io.Writer, args []string Short: "The Helm package manager for Kubernetes.", Long: globalUsage, SilenceUsage: true, - // This breaks completion for 'helm help ' - // The Cobra release following 1.0 will fix this - //ValidArgsFunction: noCompletions, // Disable file completion } flags := cmd.PersistentFlags() diff --git a/cmd/helm/search.go b/cmd/helm/search.go index 44c8d64e3..240d5e7c7 100644 --- a/cmd/helm/search.go +++ b/cmd/helm/search.go @@ -31,10 +31,9 @@ search subcommands to search different locations for charts. func newSearchCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ - Use: "search [keyword]", - Short: "search for a keyword in charts", - Long: searchDesc, - ValidArgsFunction: noCompletions, // Disable file completion + Use: "search [keyword]", + Short: "search for a keyword in charts", + Long: searchDesc, } cmd.AddCommand(newSearchHubCmd(out))