bartib
bartib copied to clipboard
`generate`/`gen`/`completions` command: Generate shell completions
I see that you are using clap
for the CLI, there is https://crates.io/crates/clap_complete to automatically generate shell completions. It would be nice, to be able to generate completions for different shells by just calling bartib completions >> {my_shell_profile}
. Here is a possible implementation: https://github.com/rustic-rs/rustic/blob/main/src/commands/completions.rs
Depending on if you want to further generate other files (e.g a bartib.toml
for configuration of e.g. style of reports, default timezones etc.) it would be useful to have that under bartib gen completions
(in the future maybe there could be a bartib gen config
or just the top-level bartib completions
.
Thank you for bringing this crate to my attention. I didn't know it existed. This looks like something bartib should definitely have.