summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKamil Dudka <kdudka@redhat.com>2017-08-14 16:13:32 +0200
committerKamil Dudka <kdudka@redhat.com>2017-08-15 12:25:46 +0200
commitab2a7079cd2a1ec279b1e6b587ba48e50c155e91 (patch)
treedacfda2dcdeb1c8d2a8d00d3388307d4e202b55e /scripts
parent9bd2248f92046906d5f0e147c2ab43b7903759bf (diff)
downloadcurl-ab2a7079cd2a1ec279b1e6b587ba48e50c155e91.tar.gz
zsh.pl: produce a working completion script again
Commit curl-7_54_0-118-g8b2f22e changed the output format of curl --help to use <file> and <dir> instead of FILE and DIR, which caused zsh.pl to produce a broken completion script: % curl --<TAB> _curl:10: no such file or directory: seconds Closes #1779
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/zsh.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/zsh.pl b/scripts/zsh.pl
index f0d8c195f..82b4d9fa2 100755
--- a/scripts/zsh.pl
+++ b/scripts/zsh.pl
@@ -54,10 +54,11 @@ sub parse_main_opts {
$option .= '}' if defined $short;
$option .= '\'[' . trim($desc) . ']\'' if defined $desc;
- $option .= ":$arg" if defined $arg;
+ $option .= ":'$arg'" if defined $arg;
$option .= ':_files'
- if defined $arg and ($arg eq 'FILE' || $arg eq 'DIR');
+ if defined $arg and ($arg eq '<file>' || $arg eq '<filename>'
+ || $arg eq '<dir>');
push @list, $option;
}