Skip to content

[Discussion] Typing a command group should print its help text by default #981

@lostintangent

Description

@lostintangent

It would be great if typing a command group (e.g. az component, az network) would print out the same text that you get when appending the -h flag. This would make the already well-documented nature of the CLI feel a little easier to navigate. For example, typing az network does in fact print out the list of acceptable commands, but it's a pretty long list, with no help descriptions, and so you really have to add -h to make that text usable.

I've always felt like help flags were mostly used for commands (to indicate that you don't want to execute it), and not command groups, and many CLIs special-case "executing" a command group by printing out its pretty-printed help text. For example, if you run docker network (or any other group/sub group), you get the full help text, that is analogous to what you'd get by running az network -h. It's a subtle difference, but saving a few keystrokes can go a long way when using a CLI a lot :)

This behavior would seem conceptually similar to the fact that simply typing az (which is the "root" command group) outputs the print-printed help text for the top-level command groups.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions