clap
clap copied to clipboard
Syntax error when attempt ZSH completion for `ValueEnum` variants
Notes
This bug is very specific to my application that I haven't managed to create a minimal reproducible code yet. So instead, I'll be providing links to my application.
Please complete the following tasks
- [X] I have searched the discussions
- [X] I have searched the open and rejected issues
Rust Version
1.62.1
Clap Version
3.2.16
Minimal reproducible code
N/A
Steps to reproduce
- Create an executable at
/usr/bin/pdu
. Or alternatively, installpdu
. - Download and install the zsh completions for pdu at
/usr/share/zsh/site-functions/_pdu
(this file was generated by./generate-completion.sh
). - Open ZSH login shell, type
pdu --bytes-format=
and then press Tab.
Actual Behaviour
The following error appears:
(eval):2: unmatched "
_arguments:465: command not found: (
(eval):2: unmatched "
_arguments:465: command not found: (
(eval):2: unmatched "
_arguments:465: command not found: (
Expected Behaviour
A completion menu of plain
, metric
, and binary
should appear to let user choose.
Additional Context
- ZSH version: 5.9
- OS: Arch Linux
- The
Args
struct: https://github.com/KSXGitHub/parallel-disk-usage/blob/0.8.2/src/args.rs - The completion generator: https://github.com/KSXGitHub/parallel-disk-usage/blob/0.8.2/cli/completions.rs
If you have an Arch Linux machine, you can also install the AUR package (bin version).
Debug Output
No response