Prefix matching for subcommands
Open
- Dominant language
- Go
- Stars
- 795
- Forks
- 51
- PR merge metrics
- No merged PRs in 30d
Description
I'd like to be able to invoke a subcommand using a unique prefix instead of having to type an exact match. E.g., if "foo" defines subcommands "dobaz", "doqux" and "dropit", then
```
"foo dob", "foo doba" -> "foo dobaz"
"foo doq", "foo doqu" -> "foo doqux"
"foo dr", "foo dro", ... -> "foo dropit"
"foo d", "foo do" -> error, ambiguous prefix
````
This is sufficiently different behavior from previously that it should probably be optional, but I'm not sure how best to fit it in.
I have an implementation I use in my own code that I can contribute.
Contributor guide
Assessment
This issue has not been assessed yet.