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

Usability: Provide short usage information when user doesn't supply enough arguments #1119

Closed
dmoore247 opened this issue Jan 11, 2024 · 0 comments · Fixed by #1276
Closed
Labels
CLI CLI related issues Enhancement New feature or request

Comments

@dmoore247
Copy link

Describe the issue

The error response could be greatly improved for better usability.

Example barely useful response to a command missing a parameter:

% databricks libraries cluster-status   
Error: accepts 1 arg(s), received 0

Better:

% databricks libraries cluster-status   
Error: accepts 1 arg(s), received 0
Usage:
  databricks libraries cluster-status CLUSTER_ID [-h | --help | flags]

OS and CLI version

Databricks CLI v0.211.0
MacOS

@dmoore247 dmoore247 added the CLI CLI related issues label Jan 11, 2024
@andrewnester andrewnester added the Enhancement New feature or request label Jan 14, 2024
github-merge-queue bot pushed a commit that referenced this issue Mar 12, 2024
## Changes
Add usage string when command fails with incorrect arguments

Fixes #1119

## Tests
Example output

```
> databricks libraries cluster-status 
Error: accepts 1 arg(s), received 0

Usage:
  databricks libraries cluster-status CLUSTER_ID [flags]

Flags:
  -h, --help   help for cluster-status

Global Flags:
      --debug            enable debug logging
  -o, --output type      output type: text or json (default text)
  -p, --profile string   ~/.databrickscfg profile
  -t, --target string    bundle target to use (if applicable)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI CLI related issues Enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants