Provide option to disable autocompletion
- 主要语言
- TypeScript
- 星标
- 27k
- 派生
- 11.8k
- 平均合并
- 14 小时 23 分钟
- 30 天内合并 PR
- 162
描述
### Which @angular/* package(s) are relevant/related to the feature request?
_No response_
### Description
If you developing an angular web app in an dev container every time the container is created or rebuild and you are running the `ng` command for the first time, the angular cli asks:
> ? Would you like to enable autocompletion? This will set up your terminal so pressing TAB while typing Angular CLI commands will show possible options and autocomplete arguments. (Enabling autocompletion will modify
configuration files in your home directory.)
You can activate this "feature" but there is no way to disable it proactive.
You could run the command `ng config -g cli.completion.prompted true`but if this is the first execution of the angular cli this only lead to the question if I want to enable autocompletion. So this isn't a solution.
### Proposed solution
Because the user has the possibility to opt this feature out when the angular cli asks you if you want to enable the autocompletion and because there is an command to enable this without being asked there should also be to possibility to disable this feature with an command like
`ng completion disable`
### Alternatives considered
As an alternative you could also make the global configuration settings
```json
{
"cli": {
"completion": {
"prompted": true
}
}
}
```
also available in the `angular.json` file.
贡献指南
调研方向
首先跟踪 Angular CLI completion command 以及 issue 中描述的全局 cli.completion.prompted 配置。确定首次运行提示和 completion 启用是如何处理的,然后添加一种受支持的禁用路径,例如 `ng completion disable`。当用户可以禁用 completion 且不会再次收到提示,并且相关 CLI 行为已由测试覆盖时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- cli
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100