aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanielsh@apache.org <danielsh@apache.org>2015-11-18 21:52:32 +0000
committerDaniel Stenberg <daniel@haxx.se>2015-11-19 12:10:31 +0100
commitb27893d15c64d6072c53f3816450bde77e9f93a9 (patch)
treef2a5c3e293150d52ab13337a49edde09a926c3f8
parent05cd55f229038e561eb471f7c8c35f546ec286bd (diff)
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
-rwxr-xr-xscripts/zsh.pl2
1 files changed, 1 insertions, 1 deletions
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;