mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 23:02:31 +00:00
Merge pull request #1141 from segevfiner/zsh-long-options-completion-fix
Fix completion of long option values in Zsh
This commit is contained in:
commit
28a55f28a2
2 changed files with 4 additions and 4 deletions
|
@ -371,7 +371,7 @@ fn write_opts_of(p: &Parser) -> String {
|
|||
}
|
||||
if let Some(long) = o.long() {
|
||||
let l = format!(
|
||||
"'{conflicts}{multiple}--{arg}+[{help}]{possible_values}' \\",
|
||||
"'{conflicts}{multiple}--{arg}=[{help}]{possible_values}' \\",
|
||||
conflicts = conflicts,
|
||||
multiple = multiple,
|
||||
arg = long,
|
||||
|
|
|
@ -108,7 +108,7 @@ _myapp() {
|
|||
case $line[1] in
|
||||
(test)
|
||||
_arguments -s -S -C \
|
||||
'--case+[the case to test]' \
|
||||
'--case=[the case to test]' \
|
||||
'-h[Prints help information]' \
|
||||
'--help[Prints help information]' \
|
||||
'-V[Prints version information]' \
|
||||
|
@ -397,7 +397,7 @@ _my_app() {
|
|||
case $line[1] in
|
||||
(test)
|
||||
_arguments -s -S -C \
|
||||
'--case+[the case to test]' \
|
||||
'--case=[the case to test]' \
|
||||
'-h[Prints help information]' \
|
||||
'--help[Prints help information]' \
|
||||
'-V[Prints version information]' \
|
||||
|
@ -406,7 +406,7 @@ _arguments -s -S -C \
|
|||
;;
|
||||
(some_cmd)
|
||||
_arguments -s -S -C \
|
||||
'--config+[the other case to test]' \
|
||||
'--config=[the other case to test]' \
|
||||
'-h[Prints help information]' \
|
||||
'--help[Prints help information]' \
|
||||
'-V[Prints version information]' \
|
||||
|
|
Loading…
Reference in a new issue