carapace-sh / carapace-bin

multi-shell multi-command argument completer
https://carapace.sh
MIT License
930 stars 49 forks source link

bazel completer #2545

Open DD5HT opened 1 month ago

DD5HT commented 1 month ago

Command

bazel

Description

Having bazel support in carapace would be really nice since it would help a lot when working in a large monorepo.

There is a completion script out there: https://bazel.build/install/completion but I haven't had a good experience with it.

I'm also open to invest some of my time into it if I would get some guidance.

Homepage

https://bazel.build/

Documentation

https://bazel.build/reference/command-line-reference

Repository

https://github.com/bazelbuild/bazel/

Complexity

XL

Anything else?

No response

Polar

Fund with Polar

rsteube commented 1 month ago

Lots of flags for that one. We could write a scraper for the java source, but seems bit of a hassle hooking into it. I'd say we just parse the help output: https://github.com/carapace-sh/carapace-spec-parse/blob/master/pkg/parse/parse.go.

DD5HT commented 1 month ago

I will take a look. Another point would be to have automatically query targets eg.

when running bazel run it would autocomplete the target based on the output of bazel query