2014-05-04 17:58 GMT+02:00 Nico Weber <notifications@github.com>:
> In misc/zsh-completion:
>
>> @@ -15,7 +16,47 @@
>>  # Add the following to your .zshrc to tab-complete ninja targets
>>  #   . path/to/ninja/misc/zsh-completion
>>
>> -_ninja() {
>> -  reply=(`(ninja -t targets all 2&>/dev/null) | awk -F: '{print $1}'`)
>> +__get_targets() {
>> +  ninja -t targets 2>/dev/null | while read -r a b; do echo $a | cut -d
>> ':' -f1; done;
>
> Why is while read -r a b; do echo $a | cut -d ':' better than awk -F:
> '{print $1}'?
read is built-in and cut is faster than awk. awk is a bit overkill for
this kind of tasks