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

docs: adjust flags to options in cobra help and usage template #1188

Merged

Conversation

fabianburth
Copy link
Contributor

@fabianburth fabianburth commented Dec 13, 2024

What this PR does / why we need it

Renames the Flags section in --help to Options. The Synopsis currently shows ocm [<options>] ..., with referring to the command line options listed under Flags. This might confuse users (or at least concern if something does not work).

Before:

> ocm get component --help
ocm get componentversions — Get Component Version

Synopsis:
  ocm get componentversions [<options>] {<component-reference>}

Aliases:
  componentversions, componentversion, cv, components, component, comps, comp, c

Flags:
  -c, --constraints constraints   version constraint
  -h, --help                      help for componentversions
      --latest                    restrict component versions to latest
      --lookup stringArray        repository name or spec for closure lookup fallback
  -o, --output string             output mode (JSON, json, tree, wide, yaml)
  -r, --recursive                 follow component reference nesting
      --repo string               repository name or spec
  -S, --scheme string             schema version
  -s, --sort stringArray          sort fields

Now:

> ocm get component --help
ocm get componentversions — Get Component Version

Synopsis:
  ocm get componentversions [<options>] {<component-reference>}

Aliases:
  componentversions, componentversion, cv, components, component, comps, comp, c

Options:
  -c, --constraints constraints   version constraint
  -h, --help                      help for componentversions
      --latest                    restrict component versions to latest
      --lookup stringArray        repository name or spec for closure lookup fallback
  -o, --output string             output mode (JSON, json, tree, wide, yaml)
  -r, --recursive                 follow component reference nesting
      --repo string               repository name or spec
  -S, --scheme string             schema version
  -s, --sort stringArray          sort fields

Which issue(s) this PR fixes

#1189

@fabianburth fabianburth requested a review from a team as a code owner December 13, 2024 08:35
@github-actions github-actions bot added area/documentation Documentation related size/xs Extra small labels Dec 13, 2024
@fabianburth fabianburth force-pushed the docs/rename-flags-to-options branch from 43840d0 to 27f78eb Compare December 13, 2024 08:37
@fabianburth fabianburth self-assigned this Dec 13, 2024
morri-son
morri-son previously approved these changes Dec 13, 2024
Copy link
Contributor

@morri-son morri-son left a comment

Choose a reason for hiding this comment

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

lgtm

@github-actions github-actions bot added size/s Small and removed size/xs Extra small labels Dec 13, 2024
@fabianburth fabianburth force-pushed the docs/rename-flags-to-options branch from 207cb7a to 31c5b72 Compare December 13, 2024 10:36
@fabianburth fabianburth added the kind/chore chore, maintenance, etc. label Dec 13, 2024
@hilmarf hilmarf added this to the 2024-Q4 milestone Dec 13, 2024
@fabianburth fabianburth merged commit 2e9fab3 into open-component-model:main Dec 13, 2024
19 checks passed
@fabianburth fabianburth deleted the docs/rename-flags-to-options branch December 13, 2024 11:12
@hilmarf hilmarf linked an issue Dec 19, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Documentation related kind/chore chore, maintenance, etc. size/s Small
Projects
Status: 🔒Closed
Development

Successfully merging this pull request may close these issues.

enhancement ocm --help misleading synopsis of [<options>] and flags
3 participants