Wrong initialization for nb_inserted in the deserialization.
[gliv.git] / tools / ggo2zsh.awk
blob9eff360b491b1c1b94ab0c791a8bcea7fa5c7707
1 BEGIN {
2 print "#compdef gliv";
3 print "";
4 print "_arguments \\";
7 /^[^\#]*option / {
8 match($0, /[^\"]+\"([^\"]+)\"[^\"]+\"([^\"]+)\"/, array);
10 long_option = array[1];
11 short_option = $3;
12 description = array[2];
14 if ($(NF - 1) == "int") {
15 plus = "+";
16 param = ":number";
17 } else
18 plus = param = "";
20 printf "'(--%s -%s)'{--%s,-%s%s}'[%s]%s' \\\n", long_option, short_option,
21 long_option, short_option, plus, description, param;
24 END {
25 print "'*:files:_files'";