mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 06:42:33 +00:00
170bd59111
zsh completions for commands that have multiple Vec arguments require special care. We can have two Vec args separated with a value terminator. We can also have two Vec args with no value terminators specified where the final arg uses 'raw' and thus requires '--' to be used. The 2nd of these scenarios requires special handling to avoid emitting a duplicate '*:arguments' completion entry. Currently, the zsh completions generate an error in this scenario: $ my-app <TAB> _arguments:...: doubled rest argument definition: *::second -- second set of of multi-length arguments: We already use the '-S' option when calling _arguments. This option makes it so that completion stops after '--' is encountered. This means that the handling for trailing 'raw' arguments does not need to specified. Special-case multi-valued arguments so that we can skip emitting the final multi-valued argument if a previous multi-valued argument has already been emitted. Closes #3022 Signed-off-by: David Aguilar <davvid@gmail.com> |
||
---|---|---|
.. | ||
examples | ||
src | ||
tests | ||
Cargo.toml | ||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
README.md |
clap_complete
Shell completion generation for
clap
Dual-licensed under Apache 2.0 or MIT.
About
Related Projects
- clap_complete_fig for fig shell completion support