command-line-api icon indicating copy to clipboard operation
command-line-api copied to clipboard

Commands with subcommands but without handler doesn't show signature help

Open Peter-Juhasz opened this issue 6 months ago • 2 comments

Expected behavior If a command has no handler, but has subcommands, it should show the signature including its subcommands like in beta3, or at least there should be a switch to get that behavior back.

Actual behavior Nothing is shown.

Peter-Juhasz avatar Jun 09 '25 07:06 Peter-Juhasz

Could you give an example of what you're expecting to see?

jonsequitur avatar Jun 09 '25 16:06 jonsequitur

I'm not familiar with beta3, but I'm thinking the same.

I have the following command tree:

root-->download
    |->exclude-->add
              |->remove
              |->locate
              |->print

All of the above are Commands and Subcommands. Let's call root, level 0, download and exclude level 1 and so on.

Help changes based on context.

e.g. If I do app --help, it'll show help and under Commands it will list download and exclude (level 1). If I do app exclude --help, it'll show add/remove/locate/print (level 2). But a user who is not familiar with the tool and the way this help feature operates, they will expect to see subcommands in the first help invocation where you're asking to see the full thing. So basically help of level 0, followed by help for each command of level 1 and so on.

Was this decision made to avoid just the text wall or were there other implications?

NPatch avatar Jun 30 '25 19:06 NPatch