chore(comp): Remove unnecessary completion code

With the move to Cobra 1.1.1, all commands that have sub-commands
have file completion automatically disabled, so helm need not do it
itself.

Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
pull/9029/head
Marc Khouzam 4 years ago committed by Marc Khouzam
parent d675b9c810
commit b266c2ef0f

@ -77,7 +77,6 @@ func newCompletionCmd(out io.Writer) *cobra.Command {
Short: "generate autocompletions script for the specified shell",
Long: completionDesc,
Args: require.NoArgs,
ValidArgsFunction: noCompletions, // Disable file completion
}
bash := &cobra.Command{

@ -89,7 +89,6 @@ func newDependencyCmd(out io.Writer) *cobra.Command {
Short: "manage a chart's dependencies",
Long: dependencyDesc,
Args: require.NoArgs,
ValidArgsFunction: noCompletions, // Disable file completion
}
cmd.AddCommand(newDependencyListCmd(out))

@ -41,7 +41,6 @@ func newGetCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
Short: "download extended information of a named release",
Long: getHelp,
Args: require.NoArgs,
ValidArgsFunction: noCompletions, // Disable file completion
}
cmd.AddCommand(newGetAllCmd(cfg, out))

@ -35,7 +35,6 @@ func newPluginCmd(out io.Writer) *cobra.Command {
Use: "plugin",
Short: "install, list, or uninstall Helm plugins",
Long: pluginHelp,
ValidArgsFunction: noCompletions, // Disable file completion
}
cmd.AddCommand(
newPluginInstallCmd(out),

@ -38,7 +38,6 @@ func newRepoCmd(out io.Writer) *cobra.Command {
Short: "add, list, remove, update, and index chart repositories",
Long: repoHelm,
Args: require.NoArgs,
ValidArgsFunction: noCompletions, // Disable file completion
}
cmd.AddCommand(newRepoAddCmd(out))

@ -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 <TAB>'
// The Cobra release following 1.0 will fix this
//ValidArgsFunction: noCompletions, // Disable file completion
}
flags := cmd.PersistentFlags()

@ -34,7 +34,6 @@ func newSearchCmd(out io.Writer) *cobra.Command {
Use: "search [keyword]",
Short: "search for a keyword in charts",
Long: searchDesc,
ValidArgsFunction: noCompletions, // Disable file completion
}
cmd.AddCommand(newSearchHubCmd(out))

Loading…
Cancel
Save