zsh completion: Preserve single quotes in output

When an option's help string contains literal single quotes, those
single quotes would be stripped from the option's description in the
completion output (unless the zsh RC_QUOTES option were set while the
completion function was being sourced, which is not the default).  This
patch makes the completion output contain single quotes where the --help
output does.

Closes #532
This commit is contained in:
danielsh@apache.org 2015-11-18 21:52:32 +00:00 committed by Daniel Stenberg
parent 05cd55f229
commit b27893d15c
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ sub parse_main_opts {
my $option = '';
$desc =~ s/'/''/g if defined $desc;
$desc =~ s/'/'\\''/g if defined $desc;
$desc =~ s/\[/\\\[/g if defined $desc;
$desc =~ s/\]/\\\]/g if defined $desc;