← Back to issue list

Better output information when requesting help for a command with bad arguments for that command

View original Github issue

Metadata

Project
craft-cli
Number
#68
Type
issue
State
open
Author
facundobatista
Labels
Created
Updated
Closed

Current evaluation

craft-cli help command errors with 'Too many parameters' when given a valid command name plus an invalid option (e.g. `charmcraft help close --bad-args`); it should show help for the named command. Still unfixed in current code; no maintainer triage, only a Jira-sync bot comment.

Suggested action: needs triage

Reason: The issue is unlabelled with no maintainer response (only the syncronize-issues-to-jira bot created CRAFT-3415), so it has not been triaged. I verified the behavior is still present: `_get_requested_help` in craft_cli/dispatcher.py (~line 375) still raises 'Too many parameters when requesting help' for extra positional args, and tests/unit/test_help.py::test_tool_exec_help_on_too_many_things explicitly encodes the current erroring behavior, so it is not fixed and should stay open pending triage.

Impact: 25 Quick Win: 15.0 Staleness: 55 Complexity: 40 Confidence: 85 Support Request: 5

Issue body

It's typical the following situation: Try to run a command with bad args... ``` myapp somecommand --bad-args ``` ...and then, when failed, ask for help on that: ``` myapp help somecommand --bad-args ``` Currently it fails because `--bad-args` is not really a valid argument for the help command. Real life example: ``` $ charmcraft help close --bad-args Usage: charmcraft [options] command [args]... Try 'charmcraft -h' for help. Error: Too many parameters when requesting help; pass a command, '--all', or leave it empty ``` It should detect that the first given parameter is actually a command name, and it should provide help for that command, no matter the invalid posterior options. Expected: ``` $ charmcraft help close --bad-args Usage: charmcraft close [options] <name> <channel> Summary: ... ```

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 25
Quick Win: 15.0
Staleness: 55
Complexity: 40
Confidence: 85
Support Request: 5
needs triage craft-cli help command errors with 'Too many parameters' when given a valid command name plus an invalid option (e.g. `charmcraft help close --bad-args`); it should show help for the named command. Still unfixed in current code; no maintainer triage, only a Jira-sync bot comment.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 15
Confidence: 80
Support Request: 5
close stale The help command fails when passed invalid arguments intended for the target subcommand. It should ignore trailing invalid flags and display help for the specified command. Currently untriaged and inactive for over four years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 92
Complexity: 20
Confidence: 85
Support Request: 5
needs triage Request to improve CLI help output by ignoring invalid trailing arguments when requesting help for a specific command. Currently fails with a parameter error. Untriaged and inactive for over a year.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 30
Confidence: 80
Support Request: 10
close stale Enhance help command to ignore invalid trailing arguments and display the specified command's usage instead of failing. Currently open, unassigned, and awaiting triage. Last activity 463 days ago.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#319 hard to run help to figure out your args charmcraft open charmcraft's help command errors out when given extra/bad arguments (e.g. 'charmcraft help close --bad-args' or 'cmd --help extra'), instead of showing help for the named command. Maintainer acknowledged and filed craft-cli#68 to fix; still open and unaddressed.
82%