Merge pull request #1141 from segevfiner/zsh-long-options-completion-fix

Fix completion of long option values in Zsh
This commit is contained in:
Kevin K 2018-01-09 10:53:03 -05:00 committed by GitHub
commit 28a55f28a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -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,

View file

@ -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]' \