[RFC]: add support for displaying suggested corrections in the REPL
- 主要语言
- JavaScript
- 星标
- 6k
- 派生
- 1.3k
- 平均合并
- 1 天 3 小时
- 30 天内合并 PR
- 611
描述
### Description
This RFC proposes adding support for displaying suggested corrections in the REPL when a user enters an identifier which does not exist. This functionality would be similar to what is offered by Julia and discussed in https://github.com/JuliaLang/julia/issues/28347.
For example, currently, when a user enters an undefined identifier
```
In [1]: base.abbs( -1.0 )
Error: base.abbs is not a function
```
This RFC proposes extending this to do something along the lines of
```
In [1]: base.abbs( -1.0 )
Error: base.abbs is not a function
Perhaps you meant base.abs, base.abs2, ...
```
There may be other UI options, and we could, similar to Julia, provide suggestions when a user provides an unknown name to `help()` (or other similar built-in REPL commands).
### Related Issues
No.
### Questions
No.
### Other
No.
### Checklist
- [X] I have read and understood the [Code of Conduct](https://github.com/stdlib-js/stdlib/blob/develop/CODE_OF_CONDUCT.md).
- [X] Searched for existing issues and pull requests.
- [X] The issue name begins with `RFC:`.
贡献指南
调研方向
Start by reviewing the REPL behavior described in this RFC and the linked Julia discussion. The proposal does not identify files, tests, or a settled UI; scope would need to be clarified before implementation. Done would mean agreeing on and implementing a way to suggest corrections for undefined identifiers, with possible support for unknown names passed to help().
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- cli
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 20/100