github / github/codeql

[CLI] Expose shell completions for `codeql` command

Open
#20,493 3 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
CodeQL
Stars
10.1k
Forks
2.1k
Avg merge
2d 15h
Merged PRs (30d)
141

Description

`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)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.