Skip to content

Commit

Permalink
Merge pull request #1141 from segevfiner/zsh-long-options-completion-fix
Browse files Browse the repository at this point in the history
Fix completion of long option values in Zsh
  • Loading branch information
kbknapp authored Jan 9, 2018
2 parents f3cd07b + eac4ca7 commit 28a55f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/completions/zsh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions tests/completions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]' \
Expand Down Expand Up @@ -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]' \
Expand All @@ -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]' \
Expand Down

0 comments on commit 28a55f2

Please sign in to comment.