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

feat: break out required and optional flags in subcommand help #262

Merged

Conversation

k3llymariee
Copy link
Contributor

ldcli teams get --help

image

Comment on lines +138 to +140
if strings.Contains(p.Value.Description, "Deprecated") {
continue
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sneaking this in here as i noticed we had some deprecated flags in the cli

{{WrappedOptionalFlagUsages . | trimTrailingWhitespaces}}

Global Flags:
{{rpad " -h, --help" 29}} Help for this command
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it felt weird to include this within the "optional" flags, even though it's not technically a global flag it kinda is? lmk if we want to move this somewhere else

@k3llymariee k3llymariee marked this pull request as ready for review May 10, 2024 00:33
@k3llymariee k3llymariee requested a review from dbolson May 10, 2024 00:33
cmd/templates.go Outdated
}

func init() {
cobra.AddTemplateFunc("WrappedRequiredFlagUsages", WrappedRequiredFlagUsages)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you move these to Execute() so we don't use init()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yup!

@k3llymariee k3llymariee changed the title feat: break out required and optional flags feat: break out required and optional flags in subcommand help May 10, 2024
@k3llymariee k3llymariee merged commit f3075bf into main May 10, 2024
3 checks passed
@k3llymariee k3llymariee deleted the kelly/sc-243521/split-up-optional-and-required-flags branch May 10, 2024 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants