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

enhancement ocm --help misleading synopsis of [<options>] and flags #1189

Closed
sk31337 opened this issue Mar 11, 2024 · 1 comment · Fixed by #1188
Closed

enhancement ocm --help misleading synopsis of [<options>] and flags #1189

sk31337 opened this issue Mar 11, 2024 · 1 comment · Fixed by #1188
Assignees
Labels
area/ipcei Important Project of Common European Interest component/ocm-cli OCM Command Line Interface kind/feature new feature, enhancement, improvement, extension

Comments

@sk31337
Copy link
Member

sk31337 commented Mar 11, 2024

Context:
When using --help flag, it often displays a long, detailed and very well written text.

During discovery of #1186, I tried to figure out via --help in which order to put the flags executing any ocm command.
I tried to figure out, if I made any mistake and the flags that I tried to use were just ignored, because I placed them in the wrong order.

ocm get c --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

What would you like to be added:
Rename [<options>] to either [<flags>] or rename flags to options.
Why is this needed:
Avoid confusing ocm end users and make it 100% clear in which order to put flags within the command synopsis.

@sk31337 sk31337 added the kind/feature new feature, enhancement, improvement, extension label Mar 11, 2024
@morri-son morri-son transferred this issue from open-component-model/ocm Mar 14, 2024
@morri-son morri-son added the component/ocm-cli OCM Command Line Interface label Mar 15, 2024
Copy link
Contributor

This issue was marked as stale because it has not had recent activity.

@github-actions github-actions bot added lifecycle/stale Nobody worked on this for 6 months (will further age) and removed lifecycle/stale Nobody worked on this for 6 months (will further age) labels Oct 24, 2024
@fabianburth fabianburth self-assigned this Dec 13, 2024
@fabianburth fabianburth transferred this issue from open-component-model/ocm-project Dec 13, 2024
@github-actions github-actions bot added the area/ipcei Important Project of Common European Interest label Dec 13, 2024
@fabianburth fabianburth moved this from 🏗 In Progress to 🔍 Review in OCM Backlog Board Dec 13, 2024
fabianburth added a commit that referenced this issue Dec 13, 2024
<!-- markdownlint-disable MD041 -->
#### What this PR does / why we need it
Renames the `Flags` section in `--help` to `Options`. The `Synopsis`
currently shows `ocm [<options>] ...`, with <options> 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
<!--
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
#1189
@fabianburth fabianburth moved this from 🔍 Review to 🍺 Done in OCM Backlog Board Dec 13, 2024
@hilmarf hilmarf closed this as completed Dec 19, 2024
@ocmbot ocmbot bot moved this from 🍺 Done to 🔒Closed in OCM Backlog Board Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ipcei Important Project of Common European Interest component/ocm-cli OCM Command Line Interface kind/feature new feature, enhancement, improvement, extension
Projects
Status: 🔒Closed
Development

Successfully merging a pull request may close this issue.

4 participants