-
-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Labels
featureIncludes new featuresIncludes new featuresπ° p2-nice-to-havePriority 2: nothing is broken but it's worth addressingPriority 2: nothing is broken but it's worth addressing
Description
Clear and concise description of the problem
Currently when a user runs a bad subcommand, we get a basic error message like Error: Command not found: badcommand with a stacktrace.
As a CLI author, I want to give some nicer output with a recommendation to use the help command.
Suggested solution
Of course we could let the user define a specific hook/handler for this exact case, but even simpler, we can just throw a specific error class that the end user can then check for with instanceof. You could imagine then customizing a message, or even adding specific notices about deprecated subcommands, or common typos.
Alternative
I can currently look for an error message starting with Command not found: but this is not ideal.
Additional context
No response
Validations
- Read the Contributing Guide.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureIncludes new featuresIncludes new featuresπ° p2-nice-to-havePriority 2: nothing is broken but it's worth addressingPriority 2: nothing is broken but it's worth addressing