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.
https://github.com/clap-rs/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?