mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
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:
parent
05cd55f229
commit
b27893d15c
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user