You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deprecated commands are not normally shown in the help by Cobra.
The CLI overrides the help logic to format it using grouping of commands, and in doing so, it no longer ignores deprecated commands.
So tanzu -h shows the deprecated login command, but doing tanzu l[tab] will not suggest login because cobra does not consider it a command that should be shown.
On the other hand, a deprecated sub-command of the tanzu CLI is hidden in the help as the help logic is not overridden for sub-commands.
Expected behavior
We should have a consistent behaviour for showing or not a deprecated command in the help.
And to match the behaviour of the shell completion, I recommend we don't show deprecated commands in the help, like cobra normally behaves.
Steps to reproduce the bug / Relevant debug output
# Notice the login command is shown although it is deprecated
tz -h | grep login
# Notice the "config server" command is not shown because it is deprecated
tz config -h | grep server
Bug description
Deprecated commands are not normally shown in the help by Cobra.
The CLI overrides the help logic to format it using grouping of commands, and in doing so, it no longer ignores deprecated commands.
So
tanzu -h
shows the deprecatedlogin
command, but doingtanzu l[tab]
will not suggestlogin
because cobra does not consider it a command that should be shown.On the other hand, a deprecated sub-command of the tanzu CLI is hidden in the help as the help logic is not overridden for sub-commands.
Expected behavior
We should have a consistent behaviour for showing or not a deprecated command in the help.
And to match the behaviour of the shell completion, I recommend we don't show deprecated commands in the help, like cobra normally behaves.
Steps to reproduce the bug / Relevant debug output
Output of
tanzu version
sha: cd55b11
Environment where the bug was observed (cloud, OS, etc)
Locally
The text was updated successfully, but these errors were encountered: