Keyboard accelerators can be used with or without the Control key.
[gliv.git] / tools / ggo2zsh.awk
blobf6124e0c773949738cd3b614c8375308287b1cdf
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;