Seeing this got me curious to know if any work has been done on generating completions for applications that make use of the clap command-line argument parser.
I did come across this work by clap while doing research for this post. The major difference in strategy is that clap is generating completion scripts in Bash, while shell_completion is a library which helps writing completion scripts in Rust. I think one exciting bit of future potential for shell_completion is it could potentially allow building something like what clap has done using the standard Rust macro system.
I actually wrote a library that generates completions for both zsh and bash for the Ruby Thor CLI library. https://github.com/snowe2010/fylla/
This could be useful in research to make it work for clap.
I wrote two articles that kind of highlight the differences in completions between the two, but only in regards to subcommands, since that's what I was trying to cover.
https://github.com/clap-rs/clap
https://crates.io/crates/clap
Among other things I found this currently open issue that has a lot of discussion and information in it:
https://github.com/clap-rs/clap/issues/568
It might be of interest to you as well, OP?