2014-05-04 17:57 GMT+02:00 Nico Weber <notifications@github.com>
> In misc/zsh-completion:
>
>> +  targets=(${(fo)"$(__get_targets)"})
>> +  _describe 'targets' targets
>> +}
>> +
>> +_arguments \
>> +  {-h,--help}'[Show help]' \
>> +  '--version[Print ninja version]' \
>> +  '-C+[Change to directory before doing anything
>> else]:directories:_directories' \
>> +  '-f+[Specify input build file (default=build.ninja)]:files:_files' \
>> +  '-j+[Run N jobs in parallel (default=number of CPUs available)]:number
>> of jobs' \
>> +  '-l+[Do not start new jobs if the load average is greater than
>> N]:number of jobs' \
>> +  '-k+[Keep going until N jobs fail (default=1)]:number of jobs' \
>> +  '-n[Dry run (do not run commands but act like they succeeded)]' \
>> +  '-v[Show all command lines while building]' \
>> +  '-d+[Enable debugging (use -d list to list modes)]:modes:__modes' \
>> +  '-t+[Run a subtool (use -t list to list subtools)]:tools:__tools' \
>
> What are the help strings used for? It seems suboptimal to duplicate them
> all here.
When you use completion in zsh you will see the help strings next to
the options. So we need to tell zsh which string for each option,
otherwise how can zsh know what to display.