Azure / Azure/azure-cli

[Feature request] Show command group help when subcommand is missing

Open
#19,592 6 comments 8 reactions 1 assignee Claimed by @jiasli View on GitHub
act-platform-engineering-squad Core Feature Candidate feature-request
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

For example, if no subcommand is provided to `docker image`, the help message is displayed:

```
> docker image

Usage: docker image COMMAND

Manage images

Commands:
build Build an image from a Dockerfile
history Show the history of an image
import Import the contents from a tarball to create a filesystem image
inspect Display detailed information on one or more images
load Load an image from a tar archive or STDIN
ls List images
prune Remove unused images
pull Pull an image or a repository from a registry
push Push an image or a repository to a registry
rm Remove one or more images
save Save one or more images to a tar archive (streamed to STDOUT by default)
tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE

Run 'docker image COMMAND --help' for more information on a command.
```

Nowadays, Azure CLI shows an error message:

```
$ az group
the following arguments are required: _subcommand

TRY THIS:
az group create --location westus --resource-group MyResourceGroup
Create a new resource group in the West US region.

az group delete --resource-group MyResourceGroup
Delete a resource group.

az group list --query "[?location=='westus']"
List all resource groups located in the West US region.

https://docs.microsoft.com/en-US/cli/azure/group#az_group_list
Read more about the command in reference docs
```

It will be more user-friendly to just show the help message of `az group --help` directly.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.