From: danielsh@apache.org Date: Wed, 18 Nov 2015 21:52:32 +0000 (+0000) Subject: zsh completion: Preserve single quotes in output X-Git-Tag: curl-7_46_0~41 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b27893d15c64d6072c53f3816450bde77e9f93a9;p=curl 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 --- diff --git a/scripts/zsh.pl b/scripts/zsh.pl index 7520a15a6..6bcbb739b 100755 --- a/scripts/zsh.pl +++ b/scripts/zsh.pl @@ -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;