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

[Bug] Explanatory text on ### headings should be included in --help output #649

Closed
dandavison opened this issue Aug 27, 2024 · 5 comments
Closed
Labels
bug Something isn't working

Comments

@dandavison
Copy link
Contributor

I think the explanatory text on the ### headings should make it into the user-facing interface, but currently I don't think it is. E.g.

...
### temporal workflow: Start, list, and operate on Workflows
### temporal workflow cancel: Send cancellation to Workflow Execution
### temporal workflow count: Number of Workflow Executions
### temporal workflow delete: Remove Workflow Execution...
...
$ temporal workflow --help | head
Workflow commands perform operations on Workflow Executions:
@dandavison dandavison added the bug Something isn't working label Aug 27, 2024
@cretz
Copy link
Member

cretz commented Aug 28, 2024

This should become moot with #620

@josh-berry
Copy link
Collaborator

This does not show up in the --help output for a specific command by design. The explanatory text is used as the one-line summary for each command that's output when you ask for a list of sub-commands, for example:

❯ temporal workflow
Workflow commands perform operations on Workflow Executions:

temporal workflow [command] [options]

For example:

temporal workflow list

Usage:
  temporal workflow [command]

Available Commands:
  cancel           Send cancellation to Workflow Execution
  count            Number of Workflow Executions
  delete           Remove Workflow Execution
  describe         Show Workflow Execution info
  execute          Start new Workflow Execution
  fix-history-json Updates an event history JSON file
  list             Show Workflow Executions
  query            Retrieve Workflow Execution state
  reset            Move Workflow Execution history point
  show             Display Event History
  signal           Send a message to a Workflow Execution
  stack            Trace a Workflow Execution
  start            Initiate a Workflow Execution
  terminate        Forcefully end a Workflow Execution
  trace            Workflow Execution live progress
  update           Synchronously run a Workflow update handler

@dandavison
Copy link
Contributor Author

Ah, thanks, I see. I think it would make sense for it to be the first sentence displayed by --help, with a newline separating it from the rest of the text. This would help ensure that the short sentence is a good summary of the subcommand, and help make the two not repeat each other and generally work well together (since the short must work well as the intro to the longer explanation).

This would be reminiscent of how command line tools use short help and long help pages. E.g. from Rust's clap library:

short help with -h

--blame-code-style <STYLE>                                    Style string for the code section of a git blame line

long help with --help

--blame-code-style <STYLE>
    Style string for the code section of a git blame line.

    By default the code will be syntax-highlighted with the same background color as the

@josh-berry
Copy link
Collaborator

Yeah, I'm not super wild about the help output generally. We can probably track this under #604. Are you okay if I mark this as a dup of that issue?

@dandavison
Copy link
Contributor Author

Are you okay if I mark this as a dup of that issue?

Sure! I'll do that now.

Closing as dup of #604

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

No branches or pull requests

3 participants