[CLI] Expose shell completions for `codeql` command
- 主要語言
- CodeQL
- 星號
- 10.1k
- 分支
- 2.1k
- 平均合併
- 2 天 15 小時
- 30 天內合併 PR
- 141
描述
`codeql` doesn't support auto-completion which would be quite nice when working with it.
I would imagine a command like `codeql generate-completions` which can then be used as `source <(codeql generate-completions)`.
It shouldn't be too hard to implement this, because as far as I know, picocli is used for CLI parsing and it shouldn't take more than a few lines of code to implement this as the hard work has already been done by picocli:
https://picocli.info/autocomplete.html#_distribution
(All you have to do is add `@Command(name = "codeql", subcommands = GenerateCompletion.class)` it seems)
貢獻指南
研究方向
Start by locating the codeql CLI command registration and its picocli setup, then read picocli's autocomplete distribution guidance. Add the requested generate-completions command so its output can be sourced by a shell, and verify that completion generation works for the codeql command and its subcommands.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- java
- 領域
- cli
- Issue 類型
- 功能
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100