add "DisableFlagsInUseLine: true" for all command

Signed-off-by: Alan Zhu <zg.zhu@daocloud.io>
pull/8095/head
Alan Zhu 5 years ago
parent c2069f7e8b
commit 7f59a6a7c0

@ -32,6 +32,7 @@ The subcommands can be used to push, pull, tag, list, or remove Helm charts.
func newChartCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { func newChartCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "chart", Use: "chart",
DisableFlagsInUseLine: true,
Short: "push, pull, tag, or remove Helm charts", Short: "push, pull, tag, or remove Helm charts",
Long: chartHelp, Long: chartHelp,
Hidden: !FeatureGateOCI.IsEnabled(), Hidden: !FeatureGateOCI.IsEnabled(),

@ -38,6 +38,7 @@ func newChartExportCmd(cfg *action.Configuration, out io.Writer) *cobra.Command
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "export [ref]", Use: "export [ref]",
DisableFlagsInUseLine: true,
Short: "export a chart to directory", Short: "export a chart to directory",
Long: chartExportDesc, Long: chartExportDesc,
Args: require.MinimumNArgs(1), Args: require.MinimumNArgs(1),

@ -33,6 +33,7 @@ Charts are sorted by ref name, alphabetically.
func newChartListCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { func newChartListCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
return &cobra.Command{ return &cobra.Command{
Use: "list", Use: "list",
DisableFlagsInUseLine: true,
Aliases: []string{"ls"}, Aliases: []string{"ls"},
Short: "list all saved charts", Short: "list all saved charts",
Long: chartListDesc, Long: chartListDesc,

@ -34,6 +34,7 @@ This will store the chart in the local registry cache to be used later.
func newChartPullCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { func newChartPullCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
return &cobra.Command{ return &cobra.Command{
Use: "pull [ref]", Use: "pull [ref]",
DisableFlagsInUseLine: true,
Short: "pull a chart from remote", Short: "pull a chart from remote",
Long: chartPullDesc, Long: chartPullDesc,
Args: require.MinimumNArgs(1), Args: require.MinimumNArgs(1),

@ -36,6 +36,7 @@ Must first run "helm chart save" or "helm chart pull".
func newChartPushCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { func newChartPushCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
return &cobra.Command{ return &cobra.Command{
Use: "push [ref]", Use: "push [ref]",
DisableFlagsInUseLine: true,
Short: "push a chart to remote", Short: "push a chart to remote",
Long: chartPushDesc, Long: chartPushDesc,
Args: require.MinimumNArgs(1), Args: require.MinimumNArgs(1),

@ -37,6 +37,7 @@ To remove all unlinked content, please run "helm chart prune". (TODO)
func newChartRemoveCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { func newChartRemoveCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
return &cobra.Command{ return &cobra.Command{
Use: "remove [ref]", Use: "remove [ref]",
DisableFlagsInUseLine: true,
Aliases: []string{"rm"}, Aliases: []string{"rm"},
Short: "remove a chart", Short: "remove a chart",
Long: chartRemoveDesc, Long: chartRemoveDesc,

@ -18,6 +18,7 @@ package main
import ( import (
"io" "io"
"k8s.io/kubectl/pkg/util/templates"
"path/filepath" "path/filepath"
"github.com/spf13/cobra" "github.com/spf13/cobra"
@ -37,7 +38,8 @@ not change the item as it exists in the cache.
func newChartSaveCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { func newChartSaveCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
return &cobra.Command{ return &cobra.Command{
Use: "save [path] [ref]", Use: "save [path] [ref]",
Short: "save a chart directory", DisableFlagsInUseLine: true,
Short: templates.LongDesc("save a chart directory"),
Long: chartSaveDesc, Long: chartSaveDesc,
Args: require.MinimumNArgs(2), Args: require.MinimumNArgs(2),
Hidden: !FeatureGateOCI.IsEnabled(), Hidden: !FeatureGateOCI.IsEnabled(),

@ -52,6 +52,7 @@ func newCompletionCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "completion SHELL", Use: "completion SHELL",
DisableFlagsInUseLine: true,
Short: "generate autocompletions script for the specified shell (bash or zsh)", Short: "generate autocompletions script for the specified shell (bash or zsh)",
Long: completionDesc, Long: completionDesc,
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {

@ -61,6 +61,7 @@ func newCreateCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "create NAME", Use: "create NAME",
DisableFlagsInUseLine: true,
Short: "create a new chart with the given name", Short: "create a new chart with the given name",
Long: createDesc, Long: createDesc,
Args: require.ExactArgs(1), Args: require.ExactArgs(1),

@ -85,6 +85,7 @@ This will produce an error if the chart cannot be loaded.
func newDependencyCmd(out io.Writer) *cobra.Command { func newDependencyCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "dependency update|build|list", Use: "dependency update|build|list",
DisableFlagsInUseLine: true,
Aliases: []string{"dep", "dependencies"}, Aliases: []string{"dep", "dependencies"},
Short: "manage a chart's dependencies", Short: "manage a chart's dependencies",
Long: dependencyDesc, Long: dependencyDesc,
@ -103,6 +104,7 @@ func newDependencyListCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "list CHART", Use: "list CHART",
DisableFlagsInUseLine: true,
Aliases: []string{"ls"}, Aliases: []string{"ls"},
Short: "list the dependencies for the given chart", Short: "list the dependencies for the given chart",
Long: dependencyListDesc, Long: dependencyListDesc,

@ -45,6 +45,7 @@ func newDependencyBuildCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "build CHART", Use: "build CHART",
DisableFlagsInUseLine: true,
Short: "rebuild the charts/ directory based on the Chart.lock file", Short: "rebuild the charts/ directory based on the Chart.lock file",
Long: dependencyBuildDesc, Long: dependencyBuildDesc,
Args: require.MaximumNArgs(1), Args: require.MaximumNArgs(1),

@ -48,6 +48,7 @@ func newDependencyUpdateCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "update CHART", Use: "update CHART",
DisableFlagsInUseLine: true,
Aliases: []string{"up"}, Aliases: []string{"up"},
Short: "update charts/ based on the contents of Chart.yaml", Short: "update charts/ based on the contents of Chart.yaml",
Long: dependencyUpDesc, Long: dependencyUpDesc,

@ -48,6 +48,7 @@ func newDocsCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "docs", Use: "docs",
DisableFlagsInUseLine: true,
Short: "generate documentation as markdown or man pages", Short: "generate documentation as markdown or man pages",
Long: docsDesc, Long: docsDesc,
Hidden: true, Hidden: true,

@ -33,6 +33,7 @@ Env prints out all the environment information in use by Helm.
func newEnvCmd(out io.Writer) *cobra.Command { func newEnvCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "env", Use: "env",
DisableFlagsInUseLine: true,
Short: "helm client environment information", Short: "helm client environment information",
Long: envHelp, Long: envHelp,
Args: require.NoArgs, Args: require.NoArgs,

@ -38,6 +38,7 @@ get extended information about the release, including:
func newGetCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { func newGetCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "get", Use: "get",
DisableFlagsInUseLine: true,
Short: "download extended information of a named release", Short: "download extended information of a named release",
Long: getHelp, Long: getHelp,
Args: require.NoArgs, Args: require.NoArgs,

@ -38,6 +38,7 @@ func newGetAllCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "all RELEASE_NAME", Use: "all RELEASE_NAME",
DisableFlagsInUseLine: true,
Short: "download all information for a named release", Short: "download all information for a named release",
Long: getAllHelp, Long: getAllHelp,
Args: require.ExactArgs(1), Args: require.ExactArgs(1),

@ -38,6 +38,7 @@ func newGetHooksCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "hooks RELEASE_NAME", Use: "hooks RELEASE_NAME",
DisableFlagsInUseLine: true,
Short: "download all hooks for a named release", Short: "download all hooks for a named release",
Long: getHooksHelp, Long: getHooksHelp,
Args: require.ExactArgs(1), Args: require.ExactArgs(1),

@ -40,6 +40,7 @@ func newGetManifestCmd(cfg *action.Configuration, out io.Writer) *cobra.Command
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "manifest RELEASE_NAME", Use: "manifest RELEASE_NAME",
DisableFlagsInUseLine: true,
Short: "download the manifest for a named release", Short: "download the manifest for a named release",
Long: getManifestHelp, Long: getManifestHelp,
Args: require.ExactArgs(1), Args: require.ExactArgs(1),

@ -36,6 +36,7 @@ func newGetNotesCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "notes RELEASE_NAME", Use: "notes RELEASE_NAME",
DisableFlagsInUseLine: true,
Short: "download the notes for a named release", Short: "download the notes for a named release",
Long: getNotesHelp, Long: getNotesHelp,
Args: require.ExactArgs(1), Args: require.ExactArgs(1),

@ -43,6 +43,7 @@ func newGetValuesCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "values RELEASE_NAME", Use: "values RELEASE_NAME",
DisableFlagsInUseLine: true,
Short: "download the values file for a named release", Short: "download the values file for a named release",
Long: getValuesHelp, Long: getValuesHelp,
Args: require.ExactArgs(1), Args: require.ExactArgs(1),

@ -57,6 +57,7 @@ func newHistoryCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "history RELEASE_NAME", Use: "history RELEASE_NAME",
DisableFlagsInUseLine: true,
Long: historyHelp, Long: historyHelp,
Short: "fetch release history", Short: "fetch release history",
Aliases: []string{"hist"}, Aliases: []string{"hist"},

@ -110,6 +110,7 @@ func newInstallCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "install [NAME] [CHART]", Use: "install [NAME] [CHART]",
DisableFlagsInUseLine: true,
Short: "install a chart", Short: "install a chart",
Long: installDesc, Long: installDesc,
Args: require.MinimumNArgs(1), Args: require.MinimumNArgs(1),

@ -46,6 +46,7 @@ func newLintCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "lint PATH", Use: "lint PATH",
DisableFlagsInUseLine: true,
Short: "examine a chart for possible issues", Short: "examine a chart for possible issues",
Long: longLintHelp, Long: longLintHelp,
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {

@ -65,6 +65,7 @@ func newListCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "list", Use: "list",
DisableFlagsInUseLine: true,
Short: "list releases", Short: "list releases",
Long: listHelp, Long: listHelp,
Aliases: []string{"ls"}, Aliases: []string{"ls"},

@ -27,6 +27,7 @@ import (
func newCmdOptions(out io.Writer) *cobra.Command { func newCmdOptions(out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "options", Use: "options",
DisableFlagsInUseLine: true,
Short: "print the list of flags inherited by all commands", Short: "print the list of flags inherited by all commands",
Long: "print the list of flags inherited by all commands", Long: "print the list of flags inherited by all commands",
Args: require.NoArgs, Args: require.NoArgs,

@ -54,6 +54,7 @@ func newPackageCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "package [CHART_PATH] [...]", Use: "package [CHART_PATH] [...]",
DisableFlagsInUseLine: true,
Short: "package a chart directory into a chart archive", Short: "package a chart directory into a chart archive",
Long: packageDesc, Long: packageDesc,
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {

@ -33,6 +33,7 @@ Manage client-side Helm plugins.
func newPluginCmd(out io.Writer) *cobra.Command { func newPluginCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "plugin", Use: "plugin",
DisableFlagsInUseLine: true,
Short: "install, list, or uninstall Helm plugins", Short: "install, list, or uninstall Helm plugins",
Long: pluginHelp, Long: pluginHelp,
} }

@ -39,6 +39,7 @@ func newPluginInstallCmd(out io.Writer) *cobra.Command {
o := &pluginInstallOptions{} o := &pluginInstallOptions{}
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "install [options] <path|url>...", Use: "install [options] <path|url>...",
DisableFlagsInUseLine: true,
Short: "install one or more Helm plugins", Short: "install one or more Helm plugins",
Long: pluginInstallDesc, Long: pluginInstallDesc,
Aliases: []string{"add"}, Aliases: []string{"add"},

@ -29,6 +29,7 @@ import (
func newPluginListCmd(out io.Writer) *cobra.Command { func newPluginListCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "list", Use: "list",
DisableFlagsInUseLine: true,
Aliases: []string{"ls"}, Aliases: []string{"ls"},
Short: "list installed Helm plugins", Short: "list installed Helm plugins",
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {

@ -37,6 +37,7 @@ func newPluginUninstallCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "uninstall <plugin>...", Use: "uninstall <plugin>...",
DisableFlagsInUseLine: true,
Aliases: []string{"rm", "remove"}, Aliases: []string{"rm", "remove"},
Short: "uninstall one or more Helm plugins", Short: "uninstall one or more Helm plugins",
PreRunE: func(cmd *cobra.Command, args []string) error { PreRunE: func(cmd *cobra.Command, args []string) error {

@ -38,6 +38,7 @@ func newPluginUpdateCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "update <plugin>...", Use: "update <plugin>...",
DisableFlagsInUseLine: true,
Aliases: []string{"up"}, Aliases: []string{"up"},
Short: "update one or more Helm plugins", Short: "update one or more Helm plugins",
PreRunE: func(cmd *cobra.Command, args []string) error { PreRunE: func(cmd *cobra.Command, args []string) error {

@ -47,6 +47,7 @@ func newPullCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "pull [chart URL | repo/chartname] [...]", Use: "pull [chart URL | repo/chartname] [...]",
DisableFlagsInUseLine: true,
Short: "download a chart from a repository and (optionally) unpack it in local directory", Short: "download a chart from a repository and (optionally) unpack it in local directory",
Aliases: []string{"fetch"}, Aliases: []string{"fetch"},
Long: pullDesc, Long: pullDesc,

@ -30,6 +30,7 @@ This command consists of multiple subcommands to interact with registries.
func newRegistryCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { func newRegistryCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "registry", Use: "registry",
DisableFlagsInUseLine: true,
Short: "login to or logout from a registry", Short: "login to or logout from a registry",
Long: registryHelp, Long: registryHelp,
Hidden: !FeatureGateOCI.IsEnabled(), Hidden: !FeatureGateOCI.IsEnabled(),

@ -42,6 +42,7 @@ func newRegistryLoginCmd(cfg *action.Configuration, out io.Writer) *cobra.Comman
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "login [host]", Use: "login [host]",
DisableFlagsInUseLine: true,
Short: "login to a registry", Short: "login to a registry",
Long: registryLoginDesc, Long: registryLoginDesc,
Args: require.MinimumNArgs(1), Args: require.MinimumNArgs(1),

@ -32,6 +32,7 @@ Remove credentials stored for a remote registry.
func newRegistryLogoutCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { func newRegistryLogoutCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
return &cobra.Command{ return &cobra.Command{
Use: "logout [host]", Use: "logout [host]",
DisableFlagsInUseLine: true,
Short: "logout from a registry", Short: "logout from a registry",
Long: registryLogoutDesc, Long: registryLogoutDesc,
Args: require.MinimumNArgs(1), Args: require.MinimumNArgs(1),

@ -35,6 +35,7 @@ It can be used to add, remove, list, and index chart repositories.
func newRepoCmd(out io.Writer) *cobra.Command { func newRepoCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "repo add|remove|list|index|update [ARGS]", Use: "repo add|remove|list|index|update [ARGS]",
DisableFlagsInUseLine: true,
Short: "add, list, remove, update, and index chart repositories", Short: "add, list, remove, update, and index chart repositories",
Long: repoHelm, Long: repoHelm,
Args: require.NoArgs, Args: require.NoArgs,

@ -57,6 +57,7 @@ func newRepoAddCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "add [NAME] [URL]", Use: "add [NAME] [URL]",
DisableFlagsInUseLine: true,
Short: "add a chart repository", Short: "add a chart repository",
Args: require.ExactArgs(2), Args: require.ExactArgs(2),
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {

@ -50,6 +50,7 @@ func newRepoIndexCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "index [DIR]", Use: "index [DIR]",
DisableFlagsInUseLine: true,
Short: "generate an index file given a directory containing packaged charts", Short: "generate an index file given a directory containing packaged charts",
Long: repoIndexDesc, Long: repoIndexDesc,
Args: require.ExactArgs(1), Args: require.ExactArgs(1),

@ -33,6 +33,7 @@ func newRepoListCmd(out io.Writer) *cobra.Command {
var outfmt output.Format var outfmt output.Format
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "list", Use: "list",
DisableFlagsInUseLine: true,
Aliases: []string{"ls"}, Aliases: []string{"ls"},
Short: "list chart repositories", Short: "list chart repositories",
Args: require.NoArgs, Args: require.NoArgs,

@ -42,6 +42,7 @@ func newRepoRemoveCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "remove [REPO1 [REPO2 ...]]", Use: "remove [REPO1 [REPO2 ...]]",
DisableFlagsInUseLine: true,
Aliases: []string{"rm"}, Aliases: []string{"rm"},
Short: "remove one or more chart repositories", Short: "remove one or more chart repositories",
Args: require.MinimumNArgs(1), Args: require.MinimumNArgs(1),

@ -46,6 +46,7 @@ func newRepoUpdateCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "update", Use: "update",
DisableFlagsInUseLine: true,
Aliases: []string{"up"}, Aliases: []string{"up"},
Short: "update information of available charts locally from chart repositories", Short: "update information of available charts locally from chart repositories",
Long: updateDesc, Long: updateDesc,

@ -44,6 +44,7 @@ func newRollbackCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "rollback <RELEASE> [REVISION]", Use: "rollback <RELEASE> [REVISION]",
DisableFlagsInUseLine: true,
Short: "roll back a release to a previous revision", Short: "roll back a release to a previous revision",
Long: rollbackDesc, Long: rollbackDesc,
Args: require.MinimumNArgs(1), Args: require.MinimumNArgs(1),

@ -72,12 +72,13 @@ By default, the default directories depend on the Operating System. The defaults
func newRootCmd(actionConfig *action.Configuration, out io.Writer, args []string) *cobra.Command { func newRootCmd(actionConfig *action.Configuration, out io.Writer, args []string) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "helm", Use: "helm",
DisableFlagsInUseLine: true,
Short: "The Helm package manager for Kubernetes.", Short: "The Helm package manager for Kubernetes.",
Long: globalUsage, Long: globalUsage,
Run: func(cmd *cobra.Command, args []string) { Run: func(cmd *cobra.Command, args []string) {
cmd.Help() cmd.Help()
}, },
SilenceUsage: true, SilenceUsage: false,
BashCompletionFunction: completion.GetBashCustomFunction(), BashCompletionFunction: completion.GetBashCustomFunction(),
} }
flags := cmd.PersistentFlags() flags := cmd.PersistentFlags()

@ -32,6 +32,7 @@ func newSearchCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "search [keyword]", Use: "search [keyword]",
DisableFlagsInUseLine: true,
Short: "search for a keyword in charts", Short: "search for a keyword in charts",
Long: searchDesc, Long: searchDesc,
} }

@ -52,6 +52,7 @@ func newSearchHubCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "hub [keyword]", Use: "hub [keyword]",
DisableFlagsInUseLine: true,
Short: "search for charts in the Helm Hub or an instance of Monocular", Short: "search for charts in the Helm Hub or an instance of Monocular",
Long: searchHubDesc, Long: searchHubDesc,
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {

@ -80,6 +80,7 @@ func newSearchRepoCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "repo [keyword]", Use: "repo [keyword]",
DisableFlagsInUseLine: true,
Short: "search repositories for a keyword in charts", Short: "search repositories for a keyword in charts",
Long: searchRepoDesc, Long: searchRepoDesc,
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {

@ -56,6 +56,7 @@ func newShowCmd(out io.Writer) *cobra.Command {
showCommand := &cobra.Command{ showCommand := &cobra.Command{
Use: "show", Use: "show",
DisableFlagsInUseLine: true,
Short: "show information of a chart", Short: "show information of a chart",
Aliases: []string{"inspect"}, Aliases: []string{"inspect"},
Long: showDesc, Long: showDesc,
@ -72,6 +73,7 @@ func newShowCmd(out io.Writer) *cobra.Command {
all := &cobra.Command{ all := &cobra.Command{
Use: "all [CHART]", Use: "all [CHART]",
DisableFlagsInUseLine: true,
Short: "show all information of the chart", Short: "show all information of the chart",
Long: showAllDesc, Long: showAllDesc,
Args: require.ExactArgs(1), Args: require.ExactArgs(1),
@ -88,6 +90,7 @@ func newShowCmd(out io.Writer) *cobra.Command {
valuesSubCmd := &cobra.Command{ valuesSubCmd := &cobra.Command{
Use: "values [CHART]", Use: "values [CHART]",
DisableFlagsInUseLine: true,
Short: "show the chart's values", Short: "show the chart's values",
Long: showValuesDesc, Long: showValuesDesc,
Args: require.ExactArgs(1), Args: require.ExactArgs(1),
@ -104,6 +107,7 @@ func newShowCmd(out io.Writer) *cobra.Command {
chartSubCmd := &cobra.Command{ chartSubCmd := &cobra.Command{
Use: "chart [CHART]", Use: "chart [CHART]",
DisableFlagsInUseLine: true,
Short: "show the chart's definition", Short: "show the chart's definition",
Long: showChartDesc, Long: showChartDesc,
Args: require.ExactArgs(1), Args: require.ExactArgs(1),
@ -120,6 +124,7 @@ func newShowCmd(out io.Writer) *cobra.Command {
readmeSubCmd := &cobra.Command{ readmeSubCmd := &cobra.Command{
Use: "readme [CHART]", Use: "readme [CHART]",
DisableFlagsInUseLine: true,
Short: "show the chart's README", Short: "show the chart's README",
Long: readmeChartDesc, Long: readmeChartDesc,
Args: require.ExactArgs(1), Args: require.ExactArgs(1),

@ -50,6 +50,7 @@ func newStatusCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "status RELEASE_NAME", Use: "status RELEASE_NAME",
DisableFlagsInUseLine: true,
Short: "display the status of the named release", Short: "display the status of the named release",
Long: statusHelp, Long: statusHelp,
Args: require.ExactArgs(1), Args: require.ExactArgs(1),

@ -53,6 +53,7 @@ func newTemplateCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "template [NAME] [CHART]", Use: "template [NAME] [CHART]",
DisableFlagsInUseLine: true,
Short: "locally render templates", Short: "locally render templates",
Long: templateDesc, Long: templateDesc,
Args: require.MinimumNArgs(1), Args: require.MinimumNArgs(1),

@ -1,3 +1,3 @@
Error: "helm get all" requires 1 argument Error: "helm get all" requires 1 argument
Usage: helm get all RELEASE_NAME [flags] Usage: helm get all RELEASE_NAME

@ -1,3 +1,3 @@
Error: "helm get hooks" requires 1 argument Error: "helm get hooks" requires 1 argument
Usage: helm get hooks RELEASE_NAME [flags] Usage: helm get hooks RELEASE_NAME

@ -1,3 +1,3 @@
Error: "helm get manifest" requires 1 argument Error: "helm get manifest" requires 1 argument
Usage: helm get manifest RELEASE_NAME [flags] Usage: helm get manifest RELEASE_NAME

@ -1,3 +1,3 @@
Error: "helm get notes" requires 1 argument Error: "helm get notes" requires 1 argument
Usage: helm get notes RELEASE_NAME [flags] Usage: helm get notes RELEASE_NAME

@ -1,3 +1,3 @@
Error: "helm get values" requires 1 argument Error: "helm get values" requires 1 argument
Usage: helm get values RELEASE_NAME [flags] Usage: helm get values RELEASE_NAME

@ -1,3 +1,3 @@
Error: "helm install" requires at least 1 argument Error: "helm install" requires at least 1 argument
Usage: helm install [NAME] [CHART] [flags] Usage: helm install [NAME] [CHART]

@ -1,3 +1,3 @@
Error: "helm rollback" requires at least 1 argument Error: "helm rollback" requires at least 1 argument
Usage: helm rollback <RELEASE> [REVISION] [flags] Usage: helm rollback <RELEASE> [REVISION]

@ -1,3 +1,3 @@
Error: "helm template" requires at least 1 argument Error: "helm template" requires at least 1 argument
Usage: helm template [NAME] [CHART] [flags] Usage: helm template [NAME] [CHART]

@ -1,3 +1,3 @@
Error: "helm uninstall" requires at least 1 argument Error: "helm uninstall" requires at least 1 argument
Usage: helm uninstall RELEASE_NAME [...] [flags] Usage: helm uninstall RELEASE_NAME [...]

@ -43,6 +43,7 @@ func newUninstallCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "uninstall RELEASE_NAME [...]", Use: "uninstall RELEASE_NAME [...]",
DisableFlagsInUseLine: true,
Aliases: []string{"del", "delete", "un"}, Aliases: []string{"del", "delete", "un"},
SuggestFor: []string{"remove", "rm"}, SuggestFor: []string{"remove", "rm"},
Short: "uninstall a release", Short: "uninstall a release",

@ -69,6 +69,7 @@ func newUpgradeCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "upgrade [RELEASE] [CHART]", Use: "upgrade [RELEASE] [CHART]",
DisableFlagsInUseLine: true,
Short: "upgrade a release", Short: "upgrade a release",
Long: upgradeDesc, Long: upgradeDesc,
Args: require.ExactArgs(2), Args: require.ExactArgs(2),

@ -41,6 +41,7 @@ func newVerifyCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "verify PATH", Use: "verify PATH",
DisableFlagsInUseLine: true,
Short: "verify that a chart at the given path has been signed and is valid", Short: "verify that a chart at the given path has been signed and is valid",
Long: verifyDesc, Long: verifyDesc,
Args: require.ExactArgs(1), Args: require.ExactArgs(1),

@ -41,7 +41,7 @@ func TestVerifyCmd(t *testing.T) {
{ {
name: "verify requires a chart", name: "verify requires a chart",
cmd: "verify", cmd: "verify",
expect: "\"helm verify\" requires 1 argument\n\nUsage: helm verify PATH [flags]", expect: "\"helm verify\" requires 1 argument\n\nUsage: helm verify PATH",
wantError: true, wantError: true,
}, },
{ {

@ -59,6 +59,7 @@ func newVersionCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "version", Use: "version",
DisableFlagsInUseLine: true,
Short: "print the client version information", Short: "print the client version information",
Long: versionDesc, Long: versionDesc,
Args: require.NoArgs, Args: require.NoArgs,

Loading…
Cancel
Save