temporalio/cli

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

Closed this issue · 5 comments

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:
cretz commented

This should become moot with #620

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

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

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?

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

Sure! I'll do that now.

Closing as dup of #604