model-checking / kani

Kani Rust Verifier
https://model-checking.github.io/kani
Apache License 2.0
2.24k stars 92 forks source link

Autocomplete feature for CLI options #2203

Open adpaco-aws opened 1 year ago

adpaco-aws commented 1 year ago

Having an autocomplete feature for CLI options would definitely improve the user experience.

A quick search suggests that clap is able to support autocomplete, although I haven't tried this yet myself. I'm also not sure if this will work since we use proxy binaries, but it's worth looking into.

If we can make it work somehow, I suspect there will be options that are easier to complete (e.g., --output-format which has a pre-fixed set of options) than others. For example, for --harness one would need to first run kani-driver in order to find the proofs. This may not be desired, so we should carefully evaluate the process for each option.

celinval commented 1 year ago

Yes, that would be awesome! I think at least enabling the auto complete for the flags would be amazing. For values that are not enums, I think it will be more complicated.

celinval commented 1 year ago

I just bumped into this enum to help with custom values: https://docs.rs/clap/4.2.7/clap/enum.ValueHint.html