When throwing an exception on missing subcommands, provide list of possible subcommands instead of deferring to help
- Dominant language
- C#
- Stars
- 11.5k
- Forks
- 960
- PR merge metrics
- No merged PRs in 30d
Description
### Checklist
- [X] I have verified this is the correct repository for opening this issue.
- [X] I have verified no other issues exist related to my request.
### Is Your Feature Request Related To A Problem? Please describe.
When running a command like `choco feature allowPreviewFeatures somethingElse`, the result is an error about requiring a subcommand, and it directs to the help output to see valid subcommands. It would be good to report the subcommands so the user doesn't need to go to the help to find them.
### Describe The Solution. Why is it needed?
Instead of a message about running again with `--help`, we should enumerate the known subcommands and provide it instead (or perhaps as well). This will allow the user to take immediate action instead of having to run the help and try to find the command they want.
### Additional Context
_No response_
### Related Issues
https://github.com/chocolatey/choco/pull/2876#discussion_r1166957550
Contributor guide
Research direction
Start by reproducing `choco feature allowPreviewFeatures somethingElse` and review the related discussion in pull request #2876. Trace the missing-subcommand error handling and identify how the known subcommands are obtained; done means the error lists valid subcommands instead of, or alongside, directing users to `--help`.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100