github / github/codeql

[CLI] Expose shell completions for `codeql` command

オープン
#20,493 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
question
主要言語
CodeQL
スター
10.1k
フォーク
2.1k
平均マージ
2日 15時間
マージ済み PR(30日)
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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。