google / google/subcommands

Subcommand suggestions for typos

Open
#24 0 comments 3 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
795
Forks
51
PR merge metrics
No merged PRs in 30d

Description

I'd like for `Commander.Execute` to print a suggestion if the given subcommand looks like a typo similar to what Git does:

```shell
$ git brunch
git: 'brunch' is not a git command. See 'git --help'.

The most similar command is
branch
```

I have a simple implementation of this using https://github.com/agext/levenshtein that I will attach as a PR.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.