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

topicSeparator space generates wrong message when used alongside usage #1011

Closed
otaviojacobi opened this issue Mar 11, 2024 · 1 comment · Fixed by #1012
Closed

topicSeparator space generates wrong message when used alongside usage #1011

otaviojacobi opened this issue Mar 11, 2024 · 1 comment · Fixed by #1012
Labels
bug Something isn't working

Comments

@otaviojacobi
Copy link

Describe the bug
When using "oclif"."topicSeparator": " " alongside a "usage" override in the command, the generated help is incorrect.

To Reproduce
When I use for example mynewcli first:second and I have the usage for this command/topic to be something like const usage = 'first:second <something>' this will generate a help with usage like "first:second ", however, if I do the same using mynewcli first second" and use a topicSeparator of " ", and usage is const usage = 'first second 'the generated help will befirst second first second ` duplicating the usage name.

Expected behavior
I expected that usage should be similar when using any topicSeparator, without duplicating the command.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS & version: Ubuntu 22.04
  • Shell/terminal & version: zsh

Additional context
Debugging, I found that this is caused be cause here it gets the standarizedId: https://github.com/oclif/core/blob/main/src/help/command.ts#L334 and then just replaces it https://github.com/oclif/core/blob/main/src/help/command.ts#L346

I think we could also replace the configuredId, so that I can use the expected "usage" as above

Copy link

git2gus bot commented Mar 11, 2024

This issue has been linked to a new work item: W-15226684

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants