[Feature Request]: suggest matching commands if the user mistypes
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
Say we've the following CLI definition:-
```sh
my-cli [options]
init - Initialize
serve - serve the project
generate - scaffold out a new project
-V, version
-h, help information
```
If we're to go with `commander.js`, https://github.com/tj/commander.js/issues/1015#issuecomment-536262298 would make it possible. While, `yargs` is shipped with a dedicated `recommendCommands()` method as part of the API. It would be great if the feature was implemented here with `sade` as well.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing sade's existing command-parsing entry points, then read the referenced commander.js discussion and yargs's recommendCommands() behavior for comparison. Define how mistyped commands should produce suggestions and what the accepted output should be; completion should be verified against the CLI definition shown in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100