Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hidden Commands Should be Ignored When Calculating Use Indentation #1272

Open
simonjarcher opened this issue Nov 2, 2020 · 3 comments · May be fixed by #1632
Open

Hidden Commands Should be Ignored When Calculating Use Indentation #1272

simonjarcher opened this issue Nov 2, 2020 · 3 comments · May be fixed by #1632
Labels
good-first-issue Issues that a new contributor could make a PR for kind/bug A bug in cobra; unintended behavior lifecycle/needs-pr Ready for a PR from the community

Comments

@simonjarcher
Copy link

The Command's AddCommand function incorrectly includes hidden commands in its calculation of the maximum lengths needed to display correctly formatted usage information. See the following: Command.go, line 1135

Any Command that has its Hidden field set to true should be ignored, otherwise the formatted usage is potentially wider than it needs to be.

@marckhouzam
Copy link
Collaborator

I confirm this. @simonjarcher should be a straightforward PR. Want to give it a shot?

@github-actions
Copy link

This issue is being marked as stale due to a long period of inactivity

@johnSchnake johnSchnake added kind/bug A bug in cobra; unintended behavior lifecycle/needs-pr Ready for a PR from the community labels Mar 1, 2022
@johnSchnake johnSchnake added good-first-issue Issues that a new contributor could make a PR for and removed kind/stale labels Mar 29, 2022
@marckhouzam
Copy link
Collaborator

This issue is being addressed by #1632

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-issue Issues that a new contributor could make a PR for kind/bug A bug in cobra; unintended behavior lifecycle/needs-pr Ready for a PR from the community
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants