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

Include options for compatgen targets in Usage help #1581

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

jd7h
Copy link
Contributor

@jd7h jd7h commented Mar 14, 2024

Make the help message of compatgen clearer by explicitly stating the valid options for .

Signed-off-by: Judith van Stegeren <judith@replicate.com>
@jd7h jd7h added documentation Improvements or additions to documentation go Pull requests that update Go code labels Mar 14, 2024
Copy link
Member

@zeke zeke left a comment

Choose a reason for hiding this comment

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

I wasn't familiar with this {foo|bar|baz} syntax for describing allowable values in an argument, so I went on a ChatGPT odyssey to understand it.

Looks like this is legit! 👍🏼

Another approach would be to leave it as compatgen <target> and expound on the values and their meanings using some combination of Short, Long, and Example.

@jd7h
Copy link
Contributor Author

jd7h commented Mar 18, 2024

Yes, this is common syntax. You can see the same syntax in man tar for example. And this was the recommended syntax according to the cobra Command docs as well.

@yorickvP yorickvP merged commit fab31a9 into main Apr 2, 2024
14 checks passed
@yorickvP yorickvP deleted the clearer-compatgen-help branch April 2, 2024 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants