These are chat archives for kbknapp/clap-rs
$ rustup completions bashprints the completion script for Bash.
$ foo <tab><tab>automatically looks for all "plugins" and lists them as subcommand options for
foothat's a bit more complicated and not supported directly in clap yet. It requires running arbitrary code for each completion and is covered in the issue #568 and #1232
footo have the ability to generate a completion script for itself, including all plugins and for said plugins to also be able to generate a completion script for themselves which you just merge with
foothat is possible and along the lines of the
rustup), for example
$ foo generatewhich would then search for all plugins, and add their name as "subcommands" to the main
foobinary. It would gen generate a script like normal, then it would call each of the plugins with their "hidden" argument to have them generate their completion scripts. It would then insert/merge those scripts into the
foocompletion script at the appropriate places (which is different for each shell).