Canop / bacon

background rust code check
https://dystroy.org/bacon
GNU Affero General Public License v3.0
1.97k stars 73 forks source link

Shell completion #226

Open srid opened 1 month ago

srid commented 1 month ago

https://docs.rs/clap_complete/latest/clap_complete/ might come in handy here to provide shell completion support.

For example, https://just.systems/ completes like this:

image

Just as just can complete the targets from justfile, I imagine that bacon complete the jobs from bacon.toml.

joshka commented 1 week ago

Generating completions is fairly simple using clap-complete

The biggest problem though is working out how to install completions when installing bacon via cargo. As far as I've found so far, this is difficult / manual as cargo doesn't want to be be a package manager.

joshka commented 1 week ago

And a possible way forward on this might be to implement this on cargo-binstall.

https://github.com/cargo-bins/cargo-binstall/issues/1978#issuecomment-2490866298