I am not seeing any where where the completion script is actually generated:
--releaseHow does the generation of the completion scripts work ?
After building a simple sample using --release, I get the following:
$ tree
.
βββ Cargo.lock
βββ Cargo.toml
βββ README.adoc
βββ src
β βββ cli.yml
β βββ main.rs
βββ target
βββ release
βββ build
βββ cli-args
βββ cli-args.d
βββ deps
β βββ ansi_term-dc00aa8213642655.d
β βββ atty-9fb9c107a1aae491.d
β βββ bitflags-12d5ff0cd1d1e3c1.d
β βββ clap-628f3835cbf1ff58.d
β βββ cli_args-1ce89ace9d3ffa2f
β βββ cli_args-1ce89ace9d3ffa2f.d
β βββ libansi_term-dc00aa8213642655.rlib
β βββ libatty-9fb9c107a1aae491.rlib
β βββ libbitflags-12d5ff0cd1d1e3c1.rlib
β βββ libc-015d13a8fc234244.d
β βββ libclap-628f3835cbf1ff58.rlib
β βββ liblibc-015d13a8fc234244.rlib
β βββ libstrsim-173d696401437ef5.rlib
β βββ libtextwrap-b669f98b21ed064a.rlib
β βββ libunicode_width-fc1225c02239f755.rlib
β βββ libyaml_rust-004b87347b1a132f.rlib
β βββ strsim-173d696401437ef5.d
β βββ textwrap-b669f98b21ed064a.d
β βββ unicode_width-fc1225c02239f755.d
β βββ yaml_rust-004b87347b1a132f.d
βββ examples
βββ incremental
βββ native
I should probably add an example to examples dir that explains this. But the details can be found here:
https://docs.rs/clap/2.32.0/clap/struct.App.html#method.gen_completions
I'm going to close this for now, and mark as "after v3 release"
Thanks @kbknapp thatΒ΄s the link I was missing.
Most helpful comment
I should probably add an example to examples dir that explains this. But the details can be found here:
https://docs.rs/clap/2.32.0/clap/struct.App.html#method.gen_completions