These are chat archives for kbknapp/clap-rs
hi, so I've been digging for a bit this and I can't find how/if
rustup is using it though I found how
cargo does that and I think it's something similar to what I was looking for:
from each plugin
cargo requires to implement command
metadata and this will return json object that can be used to build a command in main app, so you'll get help and completions there.
so before I'll get deep into implementing my own json structure for this, is there an easy way to dump clap app into json and then deserialise into subcommand or is it something that needs to be implemented?
AllowExternalSubcommandshowever one of their subcommands
completionsdoes generate the completions for the
rustupbinary dynamically at runtime. So I was suggesting using that as an example of how the completions could be generated at runtime for your external subcommand plugins