From b27893d15c64d6072c53f3816450bde77e9f93a9 Mon Sep 17 00:00:00 2001 From: "danielsh@apache.org" Date: Wed, 18 Nov 2015 21:52:32 +0000 Subject: 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 --- scripts/zsh.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') 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; -- cgit v1.2.3