Closed dotboris closed 4 years ago
The build now generates the completion scripts, the problem is that we're not really releasing them yet.
The shell completion has been generated with the build for a while now. Its main issue is that it was never packaged. This is because we were only packaging a single gzipped binary.
Things have moved on since:
In all these cases, we have the opportunity to actually package and ship the completions.
Problem is: I don't have a good way to find the OUT_DIR
variable in build.rs
. It's runtime generated and it changes a lot.
This problem is discussed here: https://github.com/rust-lang-nursery/cli-wg/blob/master/logs/2018-05-03-packaging.md#finding-buildrs-artifacts
There's also cargo-deb
that has a workaround for this: https://github.com/mmstick/cargo-deb/blob/master/example/build.rs#L7-L13
All shipped packages + manual install have shell completion. I'm calling this good enough
Clap support generating shell completion for apps. I believe that this would make alt a whole lot more usable since users will no longer need to remember command names and flags.
Documentation: https://docs.rs/clap/2.32.0/clap/struct.App.html#method.gen_completions