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

[CLI] Format long subcommand descriptions #2318

Closed
squakez opened this issue May 24, 2021 · 3 comments · Fixed by #3227
Closed

[CLI] Format long subcommand descriptions #2318

squakez opened this issue May 24, 2021 · 3 comments · Fixed by #3227
Assignees
Labels
area/cli Kamel CLI area/ux Improves user experience good first issue Does not require full understanding of the codebase status/never-stale

Comments

@squakez
Copy link
Contributor

squakez commented May 24, 2021

As we're introducing long description for certain subcommands, we can see that the help format is a bit ugly when there is a breaking line:

      --configmap stringArray          Add a ConfigMap
  -c, --connect stringArray            A ServiceBinding or Provisioned Service that the integration should bind 
to, specified as [[apigroup/]version:]kind:[namespace/]name
  -d, --dependency stringArray         A dependency that should be included, e.g., "-d camel-mail" for a Came
l component, or "-d mvn:org.my:app:1.0" for a Maven dependency
      --dev                            Enable Dev mode (equivalent to "-w --logs --sync")

I wonder if we should use some utility to get the terminal size (if it's a terminal, ie, https://pkg.go.dev/golang.org/x/term#GetSize), and adjust the description length and new lines based on that value. That would produce something like:

      --configmap stringArray          Add a ConfigMap
  -c, --connect stringArray            A ServiceBinding or Provisioned Service that the integration should bind 
                                       to, specified as [[apigroup/]version:]kind:[namespace/]name
  -d, --dependency stringArray         A dependency that should be included, e.g., "-d camel-mail" for a Came
                                       l component, or "-d mvn:org.my:app:1.0" for a Maven dependency
      --dev                            Enable Dev mode (equivalent to "-w --logs --sync")
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale due to 90 days of inactivity.
It will be closed if no further activity occurs within 15 days.
If you think that’s incorrect or the issue should never stale, please simply write any comment.
Thanks for your contributions!

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale due to 90 days of inactivity.
It will be closed if no further activity occurs within 15 days.
If you think that’s incorrect or the issue should never stale, please simply write any comment.
Thanks for your contributions!

@squakez squakez added area/cli Kamel CLI area/ux Improves user experience and removed status/stale labels Jan 20, 2022
@squakez squakez added the good first issue Does not require full understanding of the codebase label Feb 15, 2022
@KuthumiPepple
Copy link
Contributor

I'd like to work on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Kamel CLI area/ux Improves user experience good first issue Does not require full understanding of the codebase status/never-stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants