% test-app
_describe:compadd:114: unknown match specification character `+'
_describe:compadd:114: unknown match specification character `+'
_describe:compadd:114: unknown match specification character `+'
_describe:compadd:134: unknown match specification character `+'
_describe:compadd:134: unknown match specification character `+'
_describe:compadd:134: unknown match specification character `+'
_describe:compadd:134: unknown match specification character `+'
_describe:compadd:134: unknown match specification character `+'
_arguments:compadd:551: unknown match specification character `+'
Expected Behaviour
% test-app -
--help -h -- Print help
--zsh -- Generate zsh completions
-M -- This operation is broken
Additional Context
The zsh _arguments completion function has the following syntax:
_arguments [ARGUMENTS_OPTIONS] [:] COMMAND_ARG...
Where the optional colon is used to disambiguate options consumed by the _arguments function itself.
If this colon is missing and the first COMMAND_ARG conflicts with one of the options supported by _arguments, then it is misinterpreted resulting in missing options or the unknown match specification character seen above.
Please complete the following tasks
Rust Version
rustc 1.76.0 (07dca489a 2024-02-04) (Homebrew)
Clap Version
4.5.2
Minimal reproducible code
Steps to reproduce the bug with the above code
First, build the app, then set up your environment:
The validate:
Actual Behaviour
Expected Behaviour
Additional Context
The zsh
_arguments
completion function has the following syntax:Where the optional colon is used to disambiguate options consumed by the
_arguments
function itself.If this colon is missing and the first
COMMAND_ARG
conflicts with one of the options supported by_arguments
, then it is misinterpreted resulting in missing options or theunknown match specification character
seen above.Debug Output
No response